Class ApplicationError
- All Implemented Interfaces:
Serializable
Use the application error to signal the abort of an application.
This implementation of
Error
allows to set a flag that indicates whether this instance was already
logged or not. The flag is honoured by some methods in Foundation
Logging.
- Author:
- Thomas Thrien (thomas.thrien@tquadrat.org)
- Version:
- $Id: ApplicationError.java 1293 2026-10-16 13:12:15Z tquadrat $
- Since:
- 0.0.5
- See Also:
- UML Diagram
-
UML Diagram for "org.tquadrat.foundation.exception.ApplicationError"
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanA flag that indicates if the causing exception or the error condition was already logged. -
Constructor Summary
ConstructorsConstructorDescriptionApplicationError(String message) Creates a new instance ofApplicationError.ApplicationError(String message, boolean isLogged) Creates a new instance ofApplicationError.ApplicationError(String message, Throwable cause) Creates a new instance ofApplicationError.ApplicationError(String message, Throwable cause, boolean isLogged) Creates a new instance ofApplicationError.ApplicationError(Throwable cause) Creates a new instance ofApplicationError.ApplicationError(Throwable cause, boolean isLogged) Creates a new instance ofApplicationError. -
Method Summary
Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
m_IsAlreadyLogged
A flag that indicates if the causing exception or the error condition was already logged.
-
-
Constructor Details
-
ApplicationError
Creates a new instance of
ApplicationError. The 'isLogged' flag is set tofalse.- Parameters:
message- The detail message. It is saved for later retrieval by theThrowable.getMessage()method.- See Also:
-
ApplicationError
Creates a new instance of
ApplicationError.- Parameters:
message- The detail message. It is saved for later retrieval by theThrowable.getMessage()method.isLogged-trueif the error condition or the causing exception was already logged,falseif it still has to be logged.
-
ApplicationError
Creates a new instance of
ApplicationError. The 'isLogged' flag is set tofalse.- Parameters:
cause- The cause (which is saved for later retrieval by theThrowable.getCause()method). Different fromError(Throwable)isnullnot a valid value.- See Also:
-
ApplicationError
Creates a new instance of
ApplicationError.- Parameters:
cause- The cause (which is saved for later retrieval by theThrowable.getCause()method). Different fromError(Throwable)isnullnot a valid value.isLogged-trueif the error condition or the causing exception was already logged,falseif it still has to be logged.
-
ApplicationError
Creates a new instance of
ApplicationError. The 'isLogged' flag is set tofalse.- Parameters:
message- The detail message. It is saved for later retrieval by theThrowable.getMessage()method.cause- The cause (which is saved for later retrieval by theThrowable.getCause()method). Different fromError(Throwable)isnullnot a valid value.- See Also:
-
ApplicationError
Creates a new instance of
ApplicationError.- Parameters:
message- The detail message. It is saved for later retrieval by theThrowable.getMessage()method.cause- The cause (which is saved for later retrieval by theThrowable.getCause()method). Different fromError(Throwable)isnullnot a valid value.isLogged-trueif the error condition or the causing exception was already logged,falseif it still has to be logged.
-
-
Method Details
-
isLogged
Returns the 'is logged' flag.
- Returns:
trueif the error condition or the causing exception were already logged,falseotherwise.
-
setLogged
Sets the 'is logged' flag to
true.
-
