Package org.ofbiz.core.util
Class GeneralException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.ofbiz.core.util.GeneralException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
GenericConfigException
Base OFBiz Exception, provides nested exceptions, etc
Created November 5, 2001
- Version:
- 1.0
- Author:
- Andy Zeneski
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates newGeneralExceptionwithout detail message.GeneralException(String msg) Constructs anGeneralExceptionwith the specified detail message.GeneralException(String msg, Throwable nested) Constructs anGeneralExceptionwith the specified detail message and nested Exception.GeneralException(Throwable nested) Constructs anGeneralExceptionwith the specified detail message and nested Exception. -
Method Summary
Modifier and TypeMethodDescriptionReturns the detail message, including the message from the nested exception if there is one.Returns the nested exception if there is one, orthisif there is not.Returns the detail message, NOT including the message from the nested exception.voidPrints the composite message to System.err.voidPrints the composite message and the embedded stack trace to the specified stream ps.voidPrints 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 newGeneralExceptionwithout detail message. -
GeneralException
Constructs anGeneralExceptionwith the specified detail message.- Parameters:
msg- the detail message.
-
GeneralException
Constructs anGeneralExceptionwith the specified detail message and nested Exception.- Parameters:
msg- the detail message.
-
GeneralException
Constructs anGeneralExceptionwith the specified detail message and nested Exception.
-
-
Method Details
-
getMessage
Returns the detail message, including the message from the nested exception if there is one.- Overrides:
getMessagein classThrowable
-
getNonNestedMessage
Returns the detail message, NOT including the message from the nested exception. -
getNested
Returns the nested exception if there is one, orthisif there is not.Note: In earlier versions, this class incorrectly documented that it returned
nullwhen there was no nested exception. This was a lie; it has always returnedthisfor that case. Note also that this behaviour is not consistent with that ofGeneralRuntimeException. -
printStackTrace
public void printStackTrace()Prints the composite message to System.err.- Overrides:
printStackTracein classThrowable
-
printStackTrace
Prints the composite message and the embedded stack trace to the specified stream ps.- Overrides:
printStackTracein classThrowable
-
printStackTrace
Prints the composite message and the embedded stack trace to the specified print writer pw.- Overrides:
printStackTracein classThrowable
-