Name
Exception
Synopsis
This class forms the root of the
exception hierarchy in Java. An Exception signals
an abnormal condition that must be specially handled to prevent
program termination. Exceptions may be caught and handled. An
exception that is not a subclass of
RuntimeException must be declared in the
throws clause of any method that can throw it.
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-21. java.lang.Exception
public class Exception extends Throwable { // Public Constructors public Exception( ); 1.4 public Exception(Throwable cause); public Exception(String message); 1.4 public Exception(String message, Throwable cause); }
Subclasses
Too many classes to list.
Passed To
java.io.WriteAbortedException.WriteAbortedException(
),
java.nio.charset.CoderMalfunctionError.CoderMalfunctionError(
),
java.security.PrivilegedActionException.PrivilegedActionException(
), java.util.logging.ErrorManager.error(
), java.util.logging.Handler.reportError(
),
javax.xml.parsers.FactoryConfigurationError.FactoryConfigurationError(
),
javax.xml.transform.TransformerFactoryConfigurationError.TransformerFactoryConfigurationError(
), org.xml.sax.SAXException.SAXException(
),
org.xml.sax.SAXParseException.SAXParseException( )
Returned By
java.security.PrivilegedActionException.getException( ...
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