java.lang
Class Error
java.lang.Object
|
+--java.lang.Throwable
|
+--java.lang.Error
Applications should not try to catch errors since they indicate
abnormal conditions. An abnormal condition is something which should not
occur, or which should not be recovered from. This latter category
includes
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.
Since:Authors:- Brian Jones
- Tom Tromey <tromey@cygnus.com>
- Eric Blake <ebb9@email.byu.edu>
Error
public Error()
Create an error without a message. The cause remains uninitialized.
See Also:
Error
public Error(java.lang.String s)
Create an error with a message. The cause remains uninitialized.
Parameters:
See Also:
Error
public Error(java.lang.String s, java.lang.Throwable cause)
Create an error with a message and a cause.
Since:Parameters:
Error
public Error(java.lang.Throwable cause)
Create an error with a given cause, and a message of
cause == null ? null : cause.toString()
.
Since:Parameters:
ThreadDeath
andAssertionError
.A method is not required to declare any subclass of
Error
in itsthrows
clause which might be thrown but not caught while executing the method.