Class AppException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
fr.paris.lutece.portal.service.util.AppException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
NoDatabaseException
This kind of exception is thrown when the application encounters a critical problem. This class extends RuntimeException in order to avoid try/catch blocks
This class forces to write to the logs immediatly to protect against swallowing exceptions.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor 3AppException(String strMessage) Constructor 1AppException(String strMessage, Exception e) Constructor for backwards binary compatibility, same as AppException( String s, Throwable t )AppException(String strMessage, Throwable t) Constructor 2AppException(String strMessage, Throwable t, boolean bWriteToLogs) Constructor of an exception that is part of the expected behaviour of the caller (for example a resource locked by a concurrent action): the critical log is not written, the caller logs what is relevant.AppException(String strMessage, Throwable t, boolean enableSuppression, boolean writableStackTrace) Constructor 4 -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
AppException
Constructor 1- Parameters:
strMessage- The error message
-
AppException
Constructor 2- Parameters:
strMessage- The error messaget- The initial throwable
-
AppException
Constructor for backwards binary compatibility, same as AppException( String s, Throwable t )- Parameters:
strMessage- The error messagee- The initial exception
-
AppException
public AppException()Constructor 3 -
AppException
public AppException(String strMessage, Throwable t, boolean enableSuppression, boolean writableStackTrace) Constructor 4- Parameters:
strMessage- The error messagee- The initial exceptionenableSuppression- enableSuppresionwritableStackTrace- writableStackTrace
-
AppException
Constructor of an exception that is part of the expected behaviour of the caller (for example a resource locked by a concurrent action): the critical log is not written, the caller logs what is relevant.- Parameters:
strMessage- The error messaget- The initial throwablebWriteToLogs- false to not write the critical log
-