public abstract class AbstractException extends Exception implements Trap
Modifier and Type | Class and Description |
---|---|
static class |
AbstractException.AbstractHiddenException
Base exception for hidden (unchecked) / subsystem exceptions, providing
functionality for exception specific multi-language messages.
|
static class |
AbstractException.AbstractRuntimeException
Base exception for runtime (unchecked) / predictable (testable states)
exceptions, providing functionality for exception specific multi-language
messages.
|
ErrorCodeAccessor.ErrorCodeMutator, ErrorCodeAccessor.ErrorCodeProperty
Constructor and Description |
---|
AbstractException(String message) |
AbstractException(String aMessage,
String aErrorCode) |
AbstractException(String message,
Throwable cause) |
AbstractException(String aMessage,
Throwable aCause,
String aErrorCode) |
AbstractException(Throwable cause) |
AbstractException(Throwable aCause,
String aErrorCode)
/**
|
Modifier and Type | Method and Description |
---|---|
String |
getErrorCode()
Provides the according exception code.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public AbstractException(String message)
public AbstractException(Throwable cause)
public AbstractException(String aMessage, Throwable aCause, String aErrorCode)
aMessage
- - the detail message (which is saved for later retrieval
by the Throwable.getMessage() method).aCause
- - the cause (which is saved for later retrieval by the
Throwable.getCause() method). (A null value is permitted, and
indicates that the cause is nonexistent or unknown.)aErrorCode
- The exception code to be assigned to the exception. An
exception code can be provided when creating an exception and it
can be used by the business logic to retrieve a language depended
exception message (multi-language support) from a language pack
instead of just providing the single language message as being
stored by the default exceptions.public AbstractException(String aMessage, String aErrorCode)
aMessage
- - the detail message (which is saved for later retrieval
by the Throwable.getMessage() method).aErrorCode
- The exception code to be assigned to the exception. An
exception code can be provided when creating an exception and it
can be used by the business logic to retrieve a language depended
exception message (multi-language support) from a language pack
instead of just providing the single language message as being
stored by the default exceptions.public AbstractException(Throwable aCause, String aErrorCode)
aCause
- - the cause (which is saved for later retrieval by the
Throwable.getCause() method). (A null value is permitted, and
indicates that the cause is nonexistent or unknown.)aErrorCode
- The exception code to be assigned to the exception. An
exception code can be provided when creating an exception and it
can be used by the business logic to retrieve a language depended
exception message (multi-language support) from a language pack
instead of just providing the single language message as being
stored by the default exceptions.public String getErrorCode()
ErrorCodeAccessor
getErrorCode
in interface ErrorCodeAccessor
Copyright © 2016. All rights reserved.