Package org.apache.ofbiz.base.util
Class GeneralException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.apache.ofbiz.base.util.GeneralException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AuthenticatorException
,CartItemModifyException
,DataFileException
,EventHandlerException
,GeneralServiceException
,GenericConfigException
,GenericEntityException
,GenericServiceException
,HttpClientException
,ItemNotFoundException
,JobManagerException
,MiniLangException
,RecurrenceInfoException
,RecurrenceRuleException
,RequestHandlerException
,RequestHandlerExceptionAllowExternalRequests
,ScreenRenderException
,SecurityConfigurationException
,SerializeException
,SurveyWrapper.SurveyWrapperException
,ViewHandlerException
,WebAppConfigurationException
,WebPosSession.UserLoginFailure
Base OFBiz Exception, provides nested exceptions, etc
- See Also:
-
Constructor Summary
ConstructorDescriptionCreates newGeneralException
without detail message.GeneralException
(String msg) Constructs anGeneralException
with the specified detail message.GeneralException
(String msg, Throwable nested) Constructs anGeneralException
with the specified detail message and nested Exception.GeneralException
(String msg, List<String> messages) Constructs anGeneralException
with the specified detail message, list and nested Exception.GeneralException
(String msg, List<String> messages, Throwable nested) Constructs anGeneralException
with the specified detail message, list and nested Exception.GeneralException
(Throwable nested) Constructs anGeneralException
with the specified detail message and nested Exception.GeneralException
(List<String> messages) GeneralException
(List<String> messages, Throwable nested) Constructs anGeneralException
with the specified detail message list and nested Exception. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
Returns the detail message, including the message from the nested exception if there is one.Gets message list.Returns the nested exception if there is one, null if there is not.Returns the detail message, NOT including the message from the nested exception.void
Prints the composite message to System.err.void
Prints the composite message and the embedded stack trace to the specified stream ps.void
Prints the composite message and the embedded stack trace to the specified print writer pw.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toString
-
Constructor Details
-
GeneralException
public GeneralException()Creates newGeneralException
without detail message. -
GeneralException
Constructs anGeneralException
with the specified detail message.- Parameters:
msg
- the detail message.
-
GeneralException
Constructs anGeneralException
with the specified detail message and nested Exception.- Parameters:
msg
- the detail message.nested
- the nested exception.
-
GeneralException
Constructs anGeneralException
with the specified detail message and nested Exception.- Parameters:
nested
- the nested exception.
-
GeneralException
Constructs anGeneralException
with the specified detail message, list and nested Exception.- Parameters:
msg
- the detail message.messages
- error message list.
-
GeneralException
Constructs anGeneralException
with the specified detail message, list and nested Exception.- Parameters:
msg
- the detail message.messages
- error message list.nested
- the nexted exception
-
GeneralException
Constructs anGeneralException
with the specified detail message list and nested Exception.- Parameters:
messages
- error message list.nested
- the nested exception.
-
GeneralException
-
-
Method Details
-
checkException
- Throws:
GeneralException
-
getMessage
Returns the detail message, including the message from the nested exception if there is one.- Overrides:
getMessage
in classThrowable
-
getMessageList
Gets message list.- Returns:
- the message list
-
getNonNestedMessage
Returns the detail message, NOT including the message from the nested exception. -
getNested
Returns the nested exception if there is one, null if there is not. -
printStackTrace
public void printStackTrace()Prints the composite message to System.err.- Overrides:
printStackTrace
in classThrowable
-
printStackTrace
Prints the composite message and the embedded stack trace to the specified stream ps.- Overrides:
printStackTrace
in classThrowable
-
printStackTrace
Prints the composite message and the embedded stack trace to the specified print writer pw.- Overrides:
printStackTrace
in classThrowable
-