Package dev.galasa.framework.spi
Class FrameworkException
java.lang.Object
java.lang.Throwable
java.lang.Exception
dev.galasa.framework.spi.FrameworkException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AuthStoreException
,CertificateStoreException
,ConfidentialTextException
,ConfigurationPropertyStoreException
,CredentialsException
,DynamicStatusStoreException
,EventsException
,FrameworkResourceUnavailableException
,InternalServletException
,ResourcePoolingServiceException
,ResourceUnavailableException
,ResultArchiveStoreException
An exception which also holds a FrameworkErrorCode to provide more fine-grained detail about the problem
being raised/thrown, which is programmatically accessible. ie: Not just the error text, or instance of the
exception instance.
Error codes can be explicitly set when the exception is created, or will default to
FrameworkErrorDetailsBase.UNKNOWN
, or to the same error code from the cause (when that cause is also a
FrameworkException
.
This allows one type of FrameworkException to wrap another, and the original cause error code will
be propagated to the top-most FrameworkException in the chain.- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final boolean
static final boolean
-
Constructor Summary
ConstructorDescriptionFrameworkException
(FrameworkErrorDetails errorDetails) FrameworkException
(FrameworkErrorDetailsBase details, Throwable cause) FrameworkException
(FrameworkErrorDetails errorDetails, Throwable cause, boolean enableSuppression, boolean writableStackTrace) FrameworkException
(String message) FrameworkException
(String message, Throwable cause) If the cause is a framework exception, then the error code from the cause is propagated into this exception instance.FrameworkException
(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) If the cause is a framework exception, then the error code from the cause is propagated into this exception instance.FrameworkException
(Throwable cause) If the cause is a framework exception, then the error code from the cause is propagated into this exception instance. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
ENABLE_SUPRESSION_FALSE
public static final boolean ENABLE_SUPRESSION_FALSE- See Also:
-
WRITEABLE_STACK_TRACE_TRUE
public static final boolean WRITEABLE_STACK_TRACE_TRUE- See Also:
-
-
Constructor Details
-
FrameworkException
public FrameworkException() -
FrameworkException
-
FrameworkException
-
FrameworkException
If the cause is a framework exception, then the error code from the cause is propagated into this exception instance. -
FrameworkException
-
FrameworkException
If the cause is a framework exception, then the error code from the cause is propagated into this exception instance. -
FrameworkException
public FrameworkException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) If the cause is a framework exception, then the error code from the cause is propagated into this exception instance. -
FrameworkException
public FrameworkException(FrameworkErrorDetails errorDetails, Throwable cause, boolean enableSuppression, boolean writableStackTrace)
-
-
Method Details
-
getErrorDetails
-
getErrorCode
public int getErrorCode()
-