|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
org.openmdx.kernel.exception.BasicException
org.openmdx.compatibility.base.exception.StackedException
public final class StackedException
The StackedException implements stackable exceptions. Stackable exceptions are useful to avoid hidden exceptions and to allow for remapping exceptions while keeping the complete exception stack.
Instead of defining a central resource defining error codes the
StackedException follows the approach of a decentralized error
code management using error domains. An organization may define as many error
domains as required. Each error domain defines it's own error codes as
positive values starting with the value of '1'. An error code itself is not
unique, uniqness is only achieved together with an error domain.
To simplify things a number of common error codes are defined that are
are shared within all error domains. These error codes have negative values.
The StackedException provides error code mappers to map error
codes from foreign domains to strings. This mappers are used when requesting
a stringified form of the exception.
To enable interoperation with application domain specific exceptions
exception mappers are used to convert foreign exceptions to stacked
exceptions. These mappers are implicitely called when creating a new
StackedException passing an embedded exception that is not
of type StackedException.
A sample demonstrating the application of exception mappers in Corba applications:
Corba Server Corba Client
----------------------------------- -----------------------------------
: :
1) throw StackedException
2) convert to Corba User Exception
3) throw Corba User Exception
4) catch Corba User Exception
5) create StackedException passing
the Corba Exception -> invokes
the Corba Exception mapper
6) throw StackException
: :
Each StackedException provides several information elements:
StackedException,
Serialized Form| Nested Class Summary | |
|---|---|
static interface |
StackedException.CodeMapper
An CodeMapper implementation maps exception domain
specific exception codes to a string representation. |
| Nested classes/interfaces inherited from class org.openmdx.kernel.exception.BasicException |
|---|
BasicException.Code, BasicException.Mapper, BasicException.Parameter, BasicException.Wrapper |
| Field Summary | |
|---|---|
static int |
ABORT
An ABORT exception is thrown to report that a non-transactional unit of work has been aborted. |
static int |
ACTIVATION_FAILURE
Activation failure |
static int |
ASSERTION_FAILURE
Assertion error. |
static int |
AUTHENTICATION_FAILURE
authentication failure. |
static int |
AUTHORIZATION_FAILURE
authorization failure. |
static int |
BAD_CONTEXT
Error processing context |
static int |
BAD_MEMBER_NAME
Non-existing attribute or property. |
static int |
BAD_PARAMETER
An error code that signals bad/inconsistent parameters. |
static int |
BAD_QUERY_CRITERIA
Bad query criteria. |
static int |
BAD_RESOURCE
Wrong or bad resource. |
static int |
BAD_SEQUENCE_LENGTH
Invalid/Unexpected length (nr of elements) of a sequence. |
static int |
BIND_FAILURE
A bind to an object or service failed |
static int |
COMMUNICATION_FAILURE
A communication failure |
static int |
CONCURRENT_ACCESS_FAILURE
A concurrent access error condition. |
static int |
CREATION_FAILURE
The creation of a resource failed |
static int |
DATA_CONVERSION
Transformation failure |
static int |
DEACTIVATION_FAILURE
Deactivation failure |
static String |
DEFAULT_DOMAIN
The default domain. |
static int |
DUPLICATE
Duplicate element |
static int |
GENERIC
This code is used for technical error conditions such as NullPointerExceptions, ClassNotFoundExceptions, ... |
static int |
HEURISTIC
A HEURISTIC exception is thrown by the commit operation to indicate that a heuristic decision was made and that some relevant updates have been committed and others have been rolled back. |
static int |
ILLEGAL_STATE
Signals that a method has been invoked at an illegal or inappropriate time. |
static int |
INITIALIZATION_FAILURE
A initialization failure |
static int |
INVALID_CARDINALITY
Invalid cardinality. |
static int |
INVALID_CONFIGURATION
Invalid configuration. |
static int |
MARSHAL_FAILURE
Transformation failure |
static int |
MEDIA_ACCESS_FAILURE
Persistent media access error. |
static int |
NO_RESOURCE
A resource does not exist. |
static int |
NO_RESPONSE
No response available |
static int |
NONE
No error condition |
static int |
NOT_AVAILABLE
Information is not available. |
static int |
NOT_FOUND
An information or resource could not be found. |
static int |
NOT_IMPLEMENTED
Unimplemented operation or action. |
static int |
NOT_SUPPORTED
Unsupported operation or action. |
static int |
PARSE_FAILURE
Parse error |
static int |
PROCESSING_FAILURE
Processing failure |
static int |
QUOTA_EXCEEDED
The resource usage exceeded the allowed range |
static int |
ROLLBACK
A ROLLBACK exception is thrown when the transaction has been marked for rollback only or the transaction has been rolled back instead of committed. |
static int |
SECURITY_FAILURE
A security failure |
static int |
SYSTEM_EXCEPTION
A system exception (Corba, EJB, ...) |
static int |
TIMEOUT
A timeout. |
static int |
TOO_LARGE_RESULT_SET
The result of a query is too large to be handled. |
static int |
TOO_MANY_EVENT_LISTENERS
The presence of a "TOO_MANY_EVENT_LISTENERS" clause on any given concrete implementation of the normally multicast "void addEventListener" event listener registration pattern is used to annotate that interface as implementing a unicast Listener special case, that is, that one and only one Listener may be registered on the particular event listener source concurrently. |
static int |
TRANSACTION_FAILURE
A transaction failure. |
static int |
VALIDATION_FAILURE
Validation failure |
| Fields inherited from class org.openmdx.kernel.exception.BasicException |
|---|
isMicrosoftVM |
| Constructor Summary | |
|---|---|
StackedException(String exceptionDomain,
int exceptionCode,
BasicException.Parameter[] parameters,
String description)
|
|
StackedException(String className,
String methodName,
int lineNr,
String exceptionDomain,
int exceptionCode,
BasicException.Parameter[] parameters,
String description,
String[] callStack,
Date timestamp)
|
|
StackedException(Throwable throwable,
String exceptionDomain,
int exceptionCode,
BasicException.Parameter[] parameters,
String description)
|
|
StackedException(Throwable throwable,
String exceptionDomain,
int exceptionCode,
BasicException.Parameter[] parameters,
String description,
Throwable that)
|
|
StackedException(Throwable throwable,
String className,
String methodName,
int lineNr,
String exceptionDomain,
int exceptionCode,
BasicException.Parameter[] parameters,
String description,
String[] callStack,
Date timestamp)
|
|
| Method Summary |
|---|
| Methods inherited from class org.openmdx.kernel.exception.BasicException |
|---|
appendCause, breakupDescription, breakupStackTrace, getCallStack, getCause, getCause, getClassName, getDescription, getExceptionCode, getExceptionCodeString, getExceptionDomain, getExceptionStack, getLineNr, getMethodName, getParameter, getParameters, getTimestamp, initCause, parseStackTraceEntry, printStack, printStack, register, register, setSource, toStackedException, toStackedException, toStackedException, toString, toString, toStringTopLevel, toStringTopLevel |
| Methods inherited from class java.lang.Throwable |
|---|
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, printStackTrace, printStackTrace, printStackTrace, setStackTrace |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String DEFAULT_DOMAIN
public static final int NONE
public static final int ABORT
public static final int ACTIVATION_FAILURE
public static final int ASSERTION_FAILURE
Assertion errors signal "unexpected" exceptions such as programming errors.
public static final int AUTHENTICATION_FAILURE
public static final int AUTHORIZATION_FAILURE
public static final int BAD_CONTEXT
public static final int BAD_MEMBER_NAME
public static final int BAD_PARAMETER
public static final int BAD_RESOURCE
public static final int BAD_QUERY_CRITERIA
public static final int BAD_SEQUENCE_LENGTH
public static final int BIND_FAILURE
public static final int COMMUNICATION_FAILURE
public static final int CONCURRENT_ACCESS_FAILURE
public static final int CREATION_FAILURE
public static final int DATA_CONVERSION
public static final int DEACTIVATION_FAILURE
public static final int DUPLICATE
public static final int GENERIC
public static final int HEURISTIC
public static final int ILLEGAL_STATE
public static final int INITIALIZATION_FAILURE
public static final int INVALID_CARDINALITY
public static final int INVALID_CONFIGURATION
public static final int MARSHAL_FAILURE
public static final int MEDIA_ACCESS_FAILURE
public static final int NO_RESOURCE
public static final int NOT_AVAILABLE
This exception code means that the request itself is valid but the requested data is not available at the moment. (A specific stock quote for example might be unavailable due to the fact that corresponding market is not opened yet.)
public static final int NOT_FOUND
public static final int NOT_IMPLEMENTED
public static final int NO_RESPONSE
public static final int NOT_SUPPORTED
public static final int PARSE_FAILURE
public static final int PROCESSING_FAILURE
public static final int QUOTA_EXCEEDED
public static final int ROLLBACK
public static final int SECURITY_FAILURE
public static final int SYSTEM_EXCEPTION
public static final int TIMEOUT
public static final int TOO_LARGE_RESULT_SET
This exception is thrown when a method produces a result that exceeds a size-related limit. This can happen, for example, when the size of the result exceeds some implementation-specific limit.
public static final int TOO_MANY_EVENT_LISTENERS
public static final int TRANSACTION_FAILURE
CONCURRENT_ACCESS_FAILURE or TIMEOUT
CONCURRENT_ACCESS_FAILURE,
TIMEOUT,
Constant Field Valuespublic static final int VALIDATION_FAILURE
| Constructor Detail |
|---|
public StackedException(String exceptionDomain,
int exceptionCode,
BasicException.Parameter[] parameters,
String description)
exceptionDomain - exceptionCode - parameters - description -
public StackedException(Throwable throwable,
String exceptionDomain,
int exceptionCode,
BasicException.Parameter[] parameters,
String description)
throwable - exceptionDomain - exceptionCode - parameters - description -
public StackedException(String className,
String methodName,
int lineNr,
String exceptionDomain,
int exceptionCode,
BasicException.Parameter[] parameters,
String description,
String[] callStack,
Date timestamp)
className - methodName - lineNr - exceptionDomain - exceptionCode - parameters - description - callStack - timestamp -
public StackedException(Throwable throwable,
String className,
String methodName,
int lineNr,
String exceptionDomain,
int exceptionCode,
BasicException.Parameter[] parameters,
String description,
String[] callStack,
Date timestamp)
throwable - className - methodName - lineNr - exceptionDomain - exceptionCode - parameters - description - callStack - timestamp -
public StackedException(Throwable throwable,
String exceptionDomain,
int exceptionCode,
BasicException.Parameter[] parameters,
String description,
Throwable that)
throwable - exceptionDomain - exceptionCode - parameters - description - that -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||