Subclasses of LinkageError indicate that a class has
some dependency on another class; however, the latter class has
incompatibly changed after the compilation of the former class.
Thrown when the Java Virtual Machine attempts to read a class
file and determines that the file is malformed or otherwise cannot
be interpreted as a class file.
Thrown when a syntactically malformed signature attribute is
encountered by a reflective method that needs to interpret the
generic signature information for a type, method or constructor.
Thrown if the Java Virtual Machine or a ClassLoader instance
tries to load in the definition of a class (as part of a normal method call
or as part of creating a new instance using the new expression)
and no definition of the class could be found.
Thrown if an application tries to call a specified method of a
class (either static or instance), and that class no longer has a
definition of that method.
Thrown when the Java Virtual Machine cannot allocate an object
because it is out of memory, and no more memory could be made
available by the garbage collector.
Thrown when the Java Virtual Machine attempts to read a class
file and determines that the major and minor version numbers
in the file are not supported.
An 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.
The ThreadDeath error, though a "normal" condition,
is also a subclass of Error because most applications
should not try to catch it.
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.
Constructs a new error with the specified cause and a detail
message of (cause==null ? null : cause.toString()) (which
typically contains the class and detail message of cause).
Returns an array containing all of the exceptions that were
suppressed, typically by the try-with-resources
statement, in order to deliver this exception.
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.
Public Constructors
public
Error()
Constructs a new error with null as its detail message.
The cause is not initialized, and may subsequently be initialized by a
call to Throwable.initCause(Throwable).
Constructs a new error with the specified detail message. The
cause is not initialized, and may subsequently be initialized by
a call to Throwable.initCause(Throwable).
Parameters
message
the detail message. The detail message is saved for
later retrieval by the Throwable.getMessage() method.
Constructs a new error with the specified detail message and
cause.
Note that the detail message associated with
cause is not automatically incorporated in
this error's detail message.
Parameters
message
the detail message (which is saved for later retrieval
by the Throwable.getMessage() method).
cause
the cause (which is saved for later retrieval by the
Throwable.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 (cause==null ? null : cause.toString()) (which
typically contains the class and detail message of cause).
This constructor is useful for errors that are little more than
wrappers for other throwables.
Parameters
cause
the cause (which is saved for later retrieval by the
Throwable.getCause() method). (A null value is
permitted, and indicates that the cause is nonexistent or
unknown.)
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-10 UTC."],[],["`Error` extends `Throwable`, representing serious problems applications should not catch. Subclasses indicate various issues, including `AssertionError` (failed assertion), `IOError` (I/O error), `LinkageError` (incompatible class changes), and `VirtualMachineError` (JVM malfunction). Methods are not required to declare `Error` subclasses in their `throws` clause. `Error` provides constructors to initialize with a detail message and cause and a protected constructor that includes the ability to modify stack trace and suppression.\n"]]