public class Error extends Throwable
ThreadDeath
and AssertionError
.
A method is not required to declare any subclass of Error
in
its throws
clause which might be thrown but not caught while
executing the method.
Constructor and Description |
---|
Error()
Create an error without a message.
|
Error(String s)
Create an error with a message.
|
Error(String s,
Throwable cause)
Create an error with a message and a cause.
|
Error(Throwable cause)
Create an error with a given cause, and a message of
cause == null ? |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public Error()
Throwable.initCause(Throwable)
public Error(String s)
s
- the message stringThrowable.initCause(Throwable)
public Error(String s, Throwable cause)
s
- the message stringcause
- the cause of this error