public class Throwable extends Object
Constructor and Description |
---|
Throwable()
Constructs a new Throwable with null as its error message string.
|
Throwable(String message)
Constructs a new Throwable with the specified error message.
|
Throwable(String message,
Throwable cause)
Constructs a new throwable with the specified detail message and cause.
|
Throwable(Throwable cause)
Constructs a new throwable with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause).
|
Modifier and Type | Method and Description |
---|---|
void |
addSuppressed(Throwable exception) |
Throwable |
getCause()
Returns the cause of this throwable or null if the cause is nonexistent or unknown.
|
String |
getLocalizedMessage() |
String |
getMessage()
Returns the error message string of this Throwable object.
|
StackTraceElement[] |
getStackTrace() |
Throwable[] |
getSuppressed() |
Throwable |
initCause(Throwable cause)
Deprecated.
DO NOT USE THIS METHOD, its here just to get the compiler working and isn't intended for use
|
void |
printStackTrace()
Prints this Throwable and its backtrace to the standard error stream.
|
void |
setStackTrace(StackTraceElement[] el) |
String |
toString()
Returns a short description of this Throwable object.
|
public Throwable()
public Throwable(Throwable cause)
cause
- The causepublic Throwable(String message)
public Throwable initCause(Throwable cause)
public Throwable getCause()
public String getMessage()
public void printStackTrace()
public String toString()
public final void addSuppressed(Throwable exception)
public StackTraceElement[] getStackTrace()
public void setStackTrace(StackTraceElement[] el)
public final Throwable[] getSuppressed()
public String getLocalizedMessage()