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
Get Java in a Nutshell, 5th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.