Package org.openbravo.base.exception
Class OBException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.openbravo.base.exception.OBException
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ArgumentException
,AuthenticationException
,CheckException
,EntityNotFoundException
,EntityXMLException
,ExternalSystemConfigurationError
,ImportEntryAlreadyExistsException
,InvalidContentException
,InvalidRequestException
,NoAlgorithmFoundException
,NoExecutionProcessFoundException
,OBProviderException
,OBSecurityException
,OBServiceException
,OBStaleObjectException
,ParameterSerializationException
,ResourceNotFoundException
,ValidationException
public class OBException extends RuntimeException
This is the base exception for all exceptions in Openbravo. It is an unchecked exception which logs itself iflogException=true
is used in constructor or it's logger has at least debug level.- Author:
- mtaal
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description OBException()
OBException(boolean logException)
OBException(String message)
OBException(String message, boolean logException)
OBException(String message, Throwable cause)
OBException(String message, Throwable cause, boolean logException)
OBException(Throwable cause)
OBException(Throwable cause, boolean logException)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.apache.logging.log4j.Logger
getLogger()
This method returns a logger which can be used by a subclass.boolean
isLogExceptionNeeded()
This method returns if log exception is needed.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
OBException
public OBException()
-
OBException
public OBException(boolean logException)
-
OBException
public OBException(String message)
-
OBException
public OBException(String message, boolean logException)
-
OBException
public OBException(Throwable cause)
-
OBException
public OBException(Throwable cause, boolean logException)
-
-
Method Detail
-
getLogger
protected org.apache.logging.log4j.Logger getLogger()
This method returns a logger which can be used by a subclass. The logger is specific for the instance of the Exception (the subclass).- Returns:
- the class-specific Logger
-
isLogExceptionNeeded
public boolean isLogExceptionNeeded()
This method returns if log exception is needed.- Returns:
- the logExceptionNeeded
-
-