Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

java.lang
Class Exception  view Exception download Exception.java

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ClassNotFoundException, CloneNotSupportedException, IllegalAccessException, InstantiationException, InterruptedException, NoSuchFieldException, NoSuchMethodException, RuntimeException

public class Exception
extends Throwable

The root class of all exceptions worth catching in a program. This includes the special category of RuntimeException, which does not need to be declared in a throws clause. Exceptions can be used to represent almost any exceptional behavior, such as programming errors, mouse movements, keyboard clicking, etc.


Nested Class Summary
 
Nested classes inherited from class java.lang.Throwable
 
Field Summary
private static long serialVersionUID
          Compatible with JDK 1.0+.
 
Fields inherited from class java.lang.Throwable
 
Constructor Summary
Exception()
          Create an exception without a message.
Exception(String s)
          Create an exception with a message.
Exception(String s, Throwable cause)
          Create an exception with a message and a cause.
Exception(Throwable cause)
          Create an exception with a given cause, and a message of cause == null ? null : cause.toString().
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Compatible with JDK 1.0+.

See Also:
Constant Field Values
Constructor Detail

Exception

public Exception()
Create an exception without a message. The cause remains uninitialized.


Exception

public Exception(String s)
Create an exception with a message. The cause remains uninitialized.


Exception

public Exception(String s,
                 Throwable cause)
Create an exception with a message and a cause.

Since:
1.4

Exception

public Exception(Throwable cause)
Create an exception with a given cause, and a message of cause == null ? null : cause.toString().

Since:
1.4