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.Exceptionpublic 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 ); } SubclassesToo many classes to list. Passed Tojava.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 Byjava.security.PrivilegedActionException.getException( ) , javax.xml.parsers.FactoryConfigurationError.getException( ) , javax.xml.transform.TransformerFactoryConfigurationError.getException( ) , org.xml.sax.SAXException.getException( ) Thrown Byjava.security.PrivilegedExceptionAction.run( ) , java.util.concurrent.Callable.call( ) Type Ofjava.io.WriteAbortedException.detail |