public class GeneralException extends Exception
| Constructor and Description |
|---|
GeneralException()
Creates new
GeneralException without detail message. |
GeneralException(String msg)
Constructs an
GeneralException with the specified detail message. |
GeneralException(String msg,
Throwable nested)
Constructs an
GeneralException with the specified detail message and nested Exception. |
GeneralException(Throwable nested)
Constructs an
GeneralException with the specified detail message and nested Exception. |
| Modifier and Type | Method and Description |
|---|---|
String |
getMessage()
Returns the detail message, including the message from the nested exception if there is one.
|
Throwable |
getNested()
Returns the nested exception if there is one, or
this if there is not. |
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(PrintStream ps)
Prints the composite message and the embedded stack trace to the specified stream ps.
|
void |
printStackTrace(PrintWriter pw)
Prints the composite message and the embedded stack trace to the specified print writer pw.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toStringpublic GeneralException()
GeneralException without detail message.public GeneralException(String msg)
GeneralException with the specified detail message.msg - the detail message.public GeneralException(String msg, Throwable nested)
GeneralException with the specified detail message and nested Exception.msg - the detail message.public GeneralException(Throwable nested)
GeneralException with the specified detail message and nested Exception.public String getMessage()
getMessage in class Throwablepublic String getNonNestedMessage()
public Throwable getNested()
this if there is not.
Note: In earlier versions, this class incorrectly documented that it returned null when there
was no nested exception. This was a lie; it has always returned this for that case. Note also
that this behaviour is not consistent with that of GeneralRuntimeException.
public void printStackTrace()
printStackTrace in class Throwablepublic void printStackTrace(PrintStream ps)
printStackTrace in class Throwablepublic void printStackTrace(PrintWriter pw)
printStackTrace in class ThrowableCopyright © 2024 Atlassian. All rights reserved.