Module org.tquadrat.foundation.base
Class ApplicationError
java.lang.Object
java.lang.Throwable
java.lang.Error
org.tquadrat.foundation.exception.ApplicationError
- All Implemented Interfaces:
Serializable
@ClassVersion(sourceVersion="$Id: ApplicationError.java 1119 2024-03-16 09:03:57Z tquadrat $")
@API(status=STABLE,
since="0.0.5")
public class ApplicationError
extends Error
Use the application error to signal the abort of an application.
This implementation of
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 1119 2024-03-16 09:03:57Z 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 newApplicationErrorinstance.ApplicationError(String message, boolean isLogged) Creates a newApplicationErrorinstance.ApplicationError(String message, Throwable cause) Creates a newApplicationErrorinstance.ApplicationError(String message, Throwable cause, boolean isLogged) Creates a newApplicationErrorinstance.ApplicationError(Throwable cause) Creates a newApplicationErrorinstance.ApplicationError(Throwable cause, boolean isLogged) Creates a newApplicationErrorinstance. -
Method Summary
Methods inherited from class java.lang.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 newApplicationErrorinstance. 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 newApplicationErrorinstance.- 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 newApplicationErrorinstance. 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 newApplicationErrorinstance.- 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 newApplicationErrorinstance. 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 newApplicationErrorinstance.- 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 totrue.
-
