See: Description
| Interface | Description |
|---|---|
| ExceptionUtil |
This is the interface for a collection of utility functions to deal with exceptions (
Throwables). |
| ExceptionUtilLimited |
This is a limited subset of
ExceptionUtil that is GWT compatible. |
| GlobalExceptionHandler |
This is the interface used as fallback to
handle errors that
can not be handled in a specific way by generic components. |
| NlsThrowable |
This is the interface for exceptions with the following features:
real native language support via
NlsMessage.
a UUID unique per exception instance automatically generated once per exception
chain.
an error code that should be unique per exception type.
distinguish between technical exceptions and exceptions intended for end-users.
support for copying and truncation of the exception.
NOTE:Exceptions should only occur in unexpected or un-normal situations. |
| Class | Description |
|---|---|
| ExceptionTruncation |
This class configures the (potential) truncation of an exception.
|
| ThrowableHelper |
This is a small hack to truncate exceptions.
|
| ThrowableHelper.Helper |
Class for reflective access to
Throwables. |
| Exception | Description |
|---|---|
| BusinessErrorUserException | |
| ComposedException |
An
ComposedException combines a list of exceptions in one single exception. |
| DuplicateObjectException |
An
DuplicateObjectException is thrown if an object was rejected because it is a duplicate. |
| DuplicateObjectUserException |
This is a
DuplicateObjectException that represents a user failure (is NOT technical). |
| GenericSerializableException |
This is a very specific exception that allows sending of any
Throwable via a remote service. |
| IllegalCaseException |
A
IllegalCaseException is thrown if a specific case occurred that should never happen. |
| NlsClassCastException |
A
NlsClassCastException is analog to an ClassCastException but with native language
support. |
| NlsException |
This is an abstract base implementation of a checked exception with real native language support
(NLS).
|
| NlsIllegalArgumentException |
A
NlsIllegalArgumentException is analog to an IllegalArgumentException but with true native
language support. |
| NlsIllegalStateException |
A
NlsIllegalStateException is analog to an IllegalStateException but with true native
language support. |
| NlsNullPointerException |
A
NlsNullPointerException is analog to an NullPointerException but with native language
support. |
| NlsParseException |
The
NlsParseException is thrown if some data could NOT be parsed because it does NOT match the
according format (pattern or grammar). |
| NlsRuntimeException |
This is an abstract base implementation of
NlsThrowable based on RuntimeException. |
| NlsRuntimeWrapperException |
This is an
NlsRuntimeException to wrap an arbitrary NlsThrowable. |
| NlsUnsupportedOperationException |
An
NlsUnsupportedOperationException is thrown if an operation was invoked that is NOT implemented
or generally NOT supported. |
| ObjectDisposedException |
An
ObjectDisposedException is thrown if an object or value is already
disposed and therefore an
operation failed that has been invoked on it. |
| ObjectMismatchException |
An
ObjectMismatchException is thrown if an object or value do NOT match as expected. |
| ObjectNotFoundException |
An
ObjectNotFoundException is thrown if an object was requested but does NOT exist or could NOT be
found. |
| ObjectNotFoundUserException |
This is an
ObjectNotFoundException that represents a user failure (is NOT technical). |
| ReadOnlyException |
A
ReadOnlyException is thrown if the modification of something failed because it is read-only. |
| TechnicalErrorUserException |
A
TechnicalErrorUserException is wrapping arbitrary technical errors to a generic exception for
end-users or clients. |
advanced exceptions
with support for NLS (I18N/L10N), UUIDs, error codes, etc. - especially
NlsRuntimeException. Further it contains various exceptions for common errors
that can be reused. Finally, it contains the API of utilities that help to deal with exceptions especially ExceptionUtil.
public class InvalidCustomerNumberException extendsFor native language support (NLS) you create anNlsRuntimeException{ public InvalidCustomerNumberException(String customerNumber) { super(createBundle(MyNlsBundleRoot.class).errorInvalidCustomerNumber(customerNumber); } publicgetCode(){ // optional method return "CUST0001"; // maybe use a constant } }
NlsBundle typically per module:
public interface MyNlsBundleRoot extendsFor further details about the NLS and I18N please read theNlsBundle{ @NlsBundleMessage("The given customer number \"{id}\" is invalid!") NlsMessage errorInvalidCustomerNumber(@Named("id") String id); }
NLS API documentation.Copyright © 2001–2015 mmm-Team. All rights reserved.