|
All Packages Class Hierarchy This Package Previous Next Index Class java.lang.Throwablejava.lang.Object | +----java.lang.Throwable
Throwable class is the superclass of all errors
and exceptions in the Java language. Only objects that are
instances of this class (or of one of its subclasses) are thrown
by the Java Virtual Machine or can be thrown by the Java
throw statement. Similarly, only this class or one of
its subclasses can be the argument type in a catch
clause.
A Here is one example of catching an exception: try { int a[] = new int[2]; a[4]; } catch (ArrayIndexOutOfBoundsException e) { System.out.println("exception: " + e.getMessage()); e.printStackTrace(); }
Throwablepublic Throwable()
public Throwable(String message)
getMessagepublic String getMessage()
public String getLocalizedMessage()
public String toString()
public void printStackTrace()
public void printStackTrace(PrintStream s)
public void printStackTrace(PrintWriter s)
public native Throwable fillInStackTrace()
All Packages Class Hierarchy This Package Previous Next Index Submit a bug or feature |
|||||||||||||||||
With any suggestions or questions please feel free to contact us |