Error is a subclass of Throwable
that indicates serious problems that a reasonable application
should not try to catch. Most such errors are abnormal conditions.
A method is not required to declare in its throws
clause any subclasses of Error that might be thrown
during the execution of the method but not caught, since these
errors are abnormal conditions that should never occur.
That is, Error and its subclasses are regarded as unchecked
exceptions for the purposes of compile-time checking of exceptions.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final long |
| Access | Constructor and Description |
|---|---|
| public | |
| public | Error(String
the detail message. The detail message is saved for
later retrieval by the message)getMessage() method.Constructs a new error with the specified detail message. |
| public | Error(String
the detail message (which is saved for later retrieval
by the message, Throwable getMessage() method).the cause (which is saved for later retrieval by the
cause)getCause() method). (A null value is
permitted, and indicates that the cause is nonexistent or
unknown.)Constructs a new error with the specified detail message and cause. |
| public | Error(Throwable
the cause (which is saved for later retrieval by the
cause)getCause() method). (A null value is
permitted, and indicates that the cause is nonexistent or
unknown.)Constructs a new error with the specified cause and a detail
message of |
| protected | Error(String
the detail message. message, Throwable the cause. (A cause, boolean null value is permitted,
and indicates that the cause is nonexistent or unknown.)whether or not suppression is enabled
or disabled enableSuppression, boolean whether or not the stack trace should
be writable writableStackTrace)Constructs a new error with the specified detail message, cause, suppression enabled or disabled, and writable stack trace enabled or disabled. |
| serialVersionUID | back to summary |
|---|---|
| pack-priv static final long serialVersionUID Hides java. | |
| Error | back to summary |
|---|---|
| public Error() Constructs a new error with | |
| Error | back to summary |
|---|---|
| public Error(String message) Constructs a new error with the specified detail message. The
cause is not initialized, and may subsequently be initialized by
a call to
| |
| Error | back to summary |
|---|---|
| public Error(String message, Throwable cause) Constructs a new error with the specified detail message and cause. Note that the detail message associated with
| |
| Error | back to summary |
|---|---|
| public Error(Throwable cause) Constructs a new error with the specified cause and a detail
message of
| |
| Error | back to summary |
|---|---|
| protected Error(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) Constructs a new error with the specified detail message, cause, suppression enabled or disabled, and writable stack trace enabled or disabled.
| |