java.lang
Class Error

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.lang.Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable 
      extended by java.lang.Error
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable
Direct Known Subclasses:
AnnotationFormatError sample code for java.lang.annotation.AnnotationFormatError definition code for java.lang.annotation.AnnotationFormatError , AssertionError sample code for java.lang.AssertionError definition code for java.lang.AssertionError , AWTError sample code for java.awt.AWTError definition code for java.awt.AWTError , CoderMalfunctionError sample code for java.nio.charset.CoderMalfunctionError definition code for java.nio.charset.CoderMalfunctionError , FactoryConfigurationError sample code for javax.xml.parsers.FactoryConfigurationError definition code for javax.xml.parsers.FactoryConfigurationError , LinkageError sample code for java.lang.LinkageError definition code for java.lang.LinkageError , ThreadDeath sample code for java.lang.ThreadDeath definition code for java.lang.ThreadDeath , TransformerFactoryConfigurationError sample code for javax.xml.transform.TransformerFactoryConfigurationError definition code for javax.xml.transform.TransformerFactoryConfigurationError , VirtualMachineError sample code for java.lang.VirtualMachineError definition code for java.lang.VirtualMachineError

public class Error
extends Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable

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.

Since:
JDK1.0
See Also:
ThreadDeath sample code for java.lang.ThreadDeath definition code for java.lang.ThreadDeath , Serialized Form

Constructor Summary
Error sample code for java.lang.Error.Error() definition code for java.lang.Error.Error() ()
          Constructs a new error with null as its detail message.
Error sample code for java.lang.Error.Error(java.lang.String) definition code for java.lang.Error.Error(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  message)
          Constructs a new error with the specified detail message.
Error sample code for java.lang.Error.Error(java.lang.String, java.lang.Throwable) definition code for java.lang.Error.Error(java.lang.String, java.lang.Throwable) (String sample code for java.lang.String definition code for java.lang.String  message, Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable  cause)
          Constructs a new error with the specified detail message and cause.
Error sample code for java.lang.Error.Error(java.lang.Throwable) definition code for java.lang.Error.Error(java.lang.Throwable) (Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable  cause)
          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).
 
Method Summary
 
Methods inherited from class java.lang.Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable
fillInStackTrace sample code for java.lang.Throwable.fillInStackTrace() definition code for java.lang.Throwable.fillInStackTrace() , getCause sample code for java.lang.Throwable.getCause() definition code for java.lang.Throwable.getCause() , getLocalizedMessage sample code for java.lang.Throwable.getLocalizedMessage() definition code for java.lang.Throwable.getLocalizedMessage() , getMessage sample code for java.lang.Throwable.getMessage() definition code for java.lang.Throwable.getMessage() , getStackTrace sample code for java.lang.Throwable.getStackTrace() definition code for java.lang.Throwable.getStackTrace() , initCause sample code for java.lang.Throwable.initCause(java.lang.Throwable) definition code for java.lang.Throwable.initCause(java.lang.Throwable) , printStackTrace sample code for java.lang.Throwable.printStackTrace() definition code for java.lang.Throwable.printStackTrace() , printStackTrace sample code for java.lang.Throwable.printStackTrace(java.io.PrintStream) definition code for java.lang.Throwable.printStackTrace(java.io.PrintStream) , printStackTrace sample code for java.lang.Throwable.printStackTrace(java.io.PrintWriter) definition code for java.lang.Throwable.printStackTrace(java.io.PrintWriter) , setStackTrace sample code for java.lang.Throwable.setStackTrace(java.lang.StackTraceElement[]) definition code for java.lang.Throwable.setStackTrace(java.lang.StackTraceElement[]) , toString sample code for java.lang.Throwable.toString() definition code for java.lang.Throwable.toString()
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

Error sample code for java.lang.Error() definition code for java.lang.Error()

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(java.lang.Throwable) sample code for java.lang.Throwable.initCause(java.lang.Throwable) definition code for java.lang.Throwable.initCause(java.lang.Throwable) .


Error sample code for java.lang.Error(java.lang.String) definition code for java.lang.Error(java.lang.String)

public Error(String sample code for java.lang.String definition code for java.lang.String  message)
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(java.lang.Throwable) sample code for java.lang.Throwable.initCause(java.lang.Throwable) definition code for java.lang.Throwable.initCause(java.lang.Throwable) .

Parameters:
message - the detail message. The detail message is saved for later retrieval by the Throwable.getMessage() sample code for java.lang.Throwable.getMessage() definition code for java.lang.Throwable.getMessage() method.

Error sample code for java.lang.Error(java.lang.String, java.lang.Throwable) definition code for java.lang.Error(java.lang.String, java.lang.Throwable)

public Error(String sample code for java.lang.String definition code for java.lang.String  message,
             Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable  cause)
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() sample code for java.lang.Throwable.getMessage() definition code for java.lang.Throwable.getMessage() method).
cause - the cause (which is saved for later retrieval by the Throwable.getCause() sample code for java.lang.Throwable.getCause() definition code for java.lang.Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
Since:
1.4

Error sample code for java.lang.Error(java.lang.Throwable) definition code for java.lang.Error(java.lang.Throwable)

public Error(Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable  cause)
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() sample code for java.lang.Throwable.getCause() definition code for java.lang.Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
Since:
1.4