Package org.apache.ofbiz.base.util
Class GeneralRuntimeException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.apache.ofbiz.base.util.GeneralRuntimeException
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
UtilCodec.IntrusionException
public class GeneralRuntimeException extends java.lang.RuntimeException
Base OFBiz Runtime Exception, provides nested exceptions, etc- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GeneralRuntimeException()
Creates newGeneralException
without detail message.GeneralRuntimeException(java.lang.String msg)
Constructs anGeneralException
with the specified detail message.GeneralRuntimeException(java.lang.String msg, java.lang.Throwable nested)
Constructs anGeneralException
with the specified detail message and nested Exception.GeneralRuntimeException(java.lang.Throwable nested)
Constructs anGeneralException
with a nested Exception.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getMessage()
Returns the detail message, including the message from the nested exception if there is one.java.lang.Throwable
getNested()
Returns the nested exception if there is one, null if there is not.java.lang.String
getNonNestedMessage()
Returns the detail message, NOT including the message from the nested exception.void
printStackTrace()
Prints the composite message to System.err.void
printStackTrace(java.io.PrintStream ps)
Prints the composite message and the embedded stack trace to the specified stream ps.void
printStackTrace(java.io.PrintWriter pw)
Prints the composite message and the embedded stack trace to the specified print writer pw.
-
-
-
Constructor Detail
-
GeneralRuntimeException
public GeneralRuntimeException()
Creates newGeneralException
without detail message.
-
GeneralRuntimeException
public GeneralRuntimeException(java.lang.String msg)
Constructs anGeneralException
with the specified detail message.- Parameters:
msg
- the detail message.
-
GeneralRuntimeException
public GeneralRuntimeException(java.lang.Throwable nested)
Constructs anGeneralException
with a nested Exception.- Parameters:
nested
- the nested exception.
-
GeneralRuntimeException
public GeneralRuntimeException(java.lang.String msg, java.lang.Throwable nested)
Constructs anGeneralException
with the specified detail message and nested Exception.- Parameters:
msg
- the detail message.
-
-
Method Detail
-
getMessage
public java.lang.String getMessage()
Returns the detail message, including the message from the nested exception if there is one.- Overrides:
getMessage
in classjava.lang.Throwable
-
getNonNestedMessage
public java.lang.String getNonNestedMessage()
Returns the detail message, NOT including the message from the nested exception.
-
getNested
public java.lang.Throwable 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 classjava.lang.Throwable
-
printStackTrace
public void printStackTrace(java.io.PrintStream ps)
Prints the composite message and the embedded stack trace to the specified stream ps.- Overrides:
printStackTrace
in classjava.lang.Throwable
-
printStackTrace
public void printStackTrace(java.io.PrintWriter pw)
Prints the composite message and the embedded stack trace to the specified print writer pw.- Overrides:
printStackTrace
in classjava.lang.Throwable
-
-