Class ApplicationFailedException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- de.aristaflow.adept2.model.runtimeenvironment.ApplicationFailedException
-
- All Implemented Interfaces:
Serializable
public class ApplicationFailedException extends RuntimeException
Exception indicating the failing of an application / activity for internal reasons. This exception is used to inform the process management system about the failure and its reasons. Therefore the exception has an error code conforming to the ADEPT2-error codes as well as an arbitrary state. The state is component-specific and is not interpreted by the process management system itself. It can be handled by sophisticated failure recovery components plugged in the process management system. Additionally everyApplicationFailedException
contains a human readable message explaining the failure and optionally the exception that caused the failure.- Author:
- Kevin Goeser, Ulrich Kreher
- See Also:
SQLException
,ApplicationErrorCodes
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ApplicationFailedException(String errorMessage, String state, long errorCode)
Creates a newApplicationFailedException
containing the designated information which is a human readable message, the component-specific state and the ADEPT2-error code.ApplicationFailedException(String errorMessage, String state, long errorCode, Throwable cause)
Creates a newApplicationFailedException
containing the designated information which is a human readable message, the component-specific state, the ADEPT2-error code and the cause for the failure.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCompleteStackTrace()
Gets the complete stack trace of this exception as it would be printed to a print stream.long
getErrorCode()
Returns the well-defined ADEPT2-error code.String
getState()
Returns the component-specific state describing the failure further in a machine-readable form.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
ApplicationFailedException
public ApplicationFailedException(String errorMessage, String state, long errorCode)
Creates a newApplicationFailedException
containing the designated information which is a human readable message, the component-specific state and the ADEPT2-error code.- Parameters:
errorMessage
- A human readable error message for this exception.state
- Arbitrary state information specific to the component, comparable to the vendor code inSQLException
errorCode
- The well-defined ADEPT2-error code.
-
ApplicationFailedException
public ApplicationFailedException(String errorMessage, String state, long errorCode, Throwable cause)
Creates a newApplicationFailedException
containing the designated information which is a human readable message, the component-specific state, the ADEPT2-error code and the cause for the failure.- Parameters:
errorMessage
- A human readable error message for this exception.state
- Arbitrary state information specific to the component, comparable to the vendor code inSQLException
errorCode
- The well-defined ADEPT2-error code.cause
- The cause for the failing of the application, for instance, another exception.
-
-
Method Detail
-
getErrorCode
public long getErrorCode()
Returns the well-defined ADEPT2-error code.- Returns:
- The well-defined ADEPT2-error code.
-
getState
public String getState()
Returns the component-specific state describing the failure further in a machine-readable form.- Returns:
- The component-specific state describing the failure.
-
getCompleteStackTrace
public String getCompleteStackTrace()
Gets the complete stack trace of this exception as it would be printed to a print stream.- Returns:
- The complete stack trace of this exception as it would be printed to a print stream.
-
-