Name
Error
Synopsis
This class forms
the root of the error hierarchy in Java. Subclasses of
Error, unlike subclasses of
Exception, should not be caught and generally
cause termination of the program. Subclasses of
Error need not be declared in the
throws clause of a method definition. This class
inherits methods from Throwable but declares none
of its own. Each of its constructors simply invokes the corresponding
Throwable( ) constructor. See
Throwable for details.
Figure 10-20. java.lang.Error
public class Error extends Throwable { // Public Constructors public Error( ); 1.4 public Error(Throwable cause); public Error(String message); 1.4 public Error(String message, Throwable cause); }
Subclasses
AssertionError, LinkageError,
ThreadDeath,
VirtualMachineError,
java.lang.annotation.AnnotationFormatError,
java.nio.charset.CoderMalfunctionError,
javax.xml.parsers.FactoryConfigurationError,
javax.xml.transform.TransformerFactoryConfigurationError
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access