|
|||||||||
| Home >> All >> java >> [ lang overview ] | PREV NEXT | ||||||||
Uses of Class
java.lang.Throwable
| Uses of Throwable in java.lang |
| Subclasses of Throwable in java.lang | |
class |
AbstractMethodError
An AbstractMethodError is thrown when an application attempts
to access an abstract method. |
class |
ArithmeticException
Thrown when a math error has occured, such as trying to divide an integer by zero. |
class |
ArrayIndexOutOfBoundsException
Thrown when attempting to access a position outside the valid range of an array. |
class |
ArrayStoreException
Thrown when trying to store an object of the wrong runtime type in an array. |
class |
AssertionError
An assertion error normally occurs as a result of the assert
statement added in JDK 1.4, to indicate that an assertion failed. |
class |
ClassCastException
Thrown when an attempt is made to cast an object which is not of the appropriate runtime type. |
class |
ClassCircularityError
A ClassCircularityError is thrown when a circular dependency
has been detected while initializing a class. |
class |
ClassFormatError
A ClassFormatError is thrown when a Java Virtual Machine
unable to read a class file because the file is corrupted or cannot be
interpreted as a class file. |
class |
ClassNotFoundException
Thrown when a class is requested by reflection, but the class definition cannot be found. |
class |
CloneNotSupportedException
Thrown to indicate an object should not or could not be cloned. |
class |
EnumConstantNotPresentException
An exception of this type is thrown when a symbolic reference is made to an enum constant which does not exist. |
class |
Error
Applications should not try to catch errors since they indicate abnormal conditions. |
class |
Exception
The root class of all exceptions worth catching in a program. |
class |
ExceptionInInitializerError
An ExceptionInInitializerError is thrown when an uncaught
exception has occurred in a static initializer or the initializer for a
static variable. |
class |
IllegalAccessError
An IllegalAccessError is thrown when an attempt is made to
call a method, or access or modify a field that the application does not
have access to. |
class |
IllegalAccessException
Thrown whenever a reflective method tries to do something that the compiler would not allow. |
class |
IllegalArgumentException
Thrown when a method is passed an illegal or inappropriate argument. |
class |
IllegalMonitorStateException
Thrown when a thread attempts to wait or notify on a monitor that it does not own (ie. |
class |
IllegalStateException
Thrown when a method is invoked at an illegal or inappropriate time. |
class |
IllegalThreadStateException
Thrown When trying to manipulate a Thread which is in an inappropriate state. |
class |
IncompatibleClassChangeError
An IncompatibleClassChangeError is thrown when the definition
of a class used by the currently executing method has changed in an
incompatible way. |
class |
IndexOutOfBoundsException
This exception can be thrown to indicate an attempt to access an index which is out of bounds on objects like String, Array, or Vector. |
class |
InstantiationError
An InstantiationError is thrown when an attempt is made to
create an instance of an abstract class or an interface. |
class |
InstantiationException
Thrown when an attempt is made to use reflection to build a non-instantiable class (an interface or abstract class). |
class |
InternalError
An InternalError is thrown when a mystical error has
occurred in the Java Virtual Machine. |
class |
InterruptedException
Thrown when a thread interrupts another thread which was previously sleeping, waiting, or paused in some other way. |
class |
LinkageError
Subclasses of LinkageError are thrown to indicate that two
classes which were compatible at separate compilation times cannot be
linked to one another. |
class |
NegativeArraySizeException
Thrown when an attempt is made to create an array with a negative size. |
class |
NoClassDefFoundError
A NoClassDefFoundError is thrown when a classloader or the
Java Virtual Machine tries to load a class and no definition of the class
can be found. |
class |
NoSuchFieldError
A NoSuchFieldError is thrown if an application attempts
to access a field of a class, and that class no longer has that field. |
class |
NoSuchFieldException
Thrown to indicate the class does not have the specified field. |
class |
NoSuchMethodError
A NoSuchMethodError is thrown if an application attempts
to access a method of a class, and that class no longer has that method. |
class |
NoSuchMethodException
Thrown to indicate the class does not have the specified method. |
class |
NullPointerException
Thrown when attempting to use null where an object
is required. |
class |
NumberFormatException
Can be thrown when attempting to convert a String to
one of the numeric types, but the operation fails because the string
has the wrong format. |
class |
OutOfMemoryError
Thrown when the Java Virtual Machine is unable to allocate an object because it is out of memory and no more memory could be made available by the garbage collector. |
class |
RuntimeException
All exceptions which are subclasses of RuntimeException
can be thrown at any time during the execution of a Java virtual machine. |
class |
SecurityException
The security manager will throw this exception to indicate a security violation. |
class |
StackOverflowError
A StackOverflowError is thrown when the execution stack
overflow occurs. |
class |
StringIndexOutOfBoundsException
This exception can be thrown to indicate an attempt to access an index which is out of bounds of a String. |
class |
ThreadDeath
ThreadDeath is thrown in a thread when someone calls stop()
on that thread. |
class |
TypeNotPresentException
Thrown when a type is accessed using a String-based
representation, but no definition of the supplied type is found. |
class |
UnknownError
An UnknownError is thrown when a serious but unknown
problem has occurred in the Java Virtual Machine. |
class |
UnsatisfiedLinkError
A UnsatisfiedLinkError is thrown if an appropriate
native language definition of a method declared native
cannot be found by the Java Virtual Machine. |
class |
UnsupportedClassVersionError
An UnsupportedClassVersionError is thrown when the
Java Virtual Machine determines it does not support the major and minor
version numbers in the class file it is attempting to read. |
class |
UnsupportedOperationException
This exception is thrown by an object when an operation is requested of it that it does not support. |
class |
VerifyError
A VerifyError is thrown if there is a security problem or
internal inconsistency in a class file as detected by the "verifier." |
class |
VirtualMachineError
A VirtualMachineError or its subclasses are thrown to
indicate there is something wrong with the Java Virtual Machine or that
it does not have the resources needed for it to continue execution. |
| Fields in java.lang declared as Throwable | |
(package private) Throwable |
VMProcess.exception
|
private Throwable |
Throwable.cause
The cause of the throwable, including null for an unknown or non-chained cause. |
private Throwable |
ClassNotFoundException.ex
The cause of this exception (duplicates the one stored in Throwable). |
(package private) Throwable |
Thread.stillborn
Was the thread stopped before it was started? |
private Throwable |
ExceptionInInitializerError.exception
The cause of this exception (duplicates the one stored in Throwable). |
| Methods in java.lang that return Throwable | |
Throwable |
Throwable.getCause()
Returns the cause of this exception, or null if the cause is not known or non-existant. |
Throwable |
Throwable.initCause(Throwable cause)
Initialize the cause of this Throwable. |
Throwable |
Throwable.fillInStackTrace()
Fill in the stack trace with the current execution stack. |
Throwable |
ClassNotFoundException.getException()
Returns the exception which occurred while loading the class, otherwise returns null. |
Throwable |
ClassNotFoundException.getCause()
Returns the exception which occurred while loading the class, otherwise returns null. |
Throwable |
ExceptionInInitializerError.getException()
Return the exception that caused this error to be created. |
Throwable |
ExceptionInInitializerError.getCause()
Return the exception that cause this error to be created. |
| Methods in java.lang with parameters of type Throwable | |
(package private) void |
VMThread.stop(Throwable t)
Deprecated. unsafe operation, try not to use |
(package private) void |
VMThread.nativeStop(Throwable t)
Asynchronously throw the specified throwable in this Thread. |
(package private) static void |
VMClass.throwException(Throwable t)
Throw a checked exception without declaring it. |
(package private) static VMThrowable |
VMThrowable.fillInStackTrace(Throwable t)
Fill in the stack trace with the current execution stack. |
(package private) StackTraceElement[] |
VMThrowable.getStackTrace(Throwable t)
Returns an StackTraceElement array based on the execution
state of the VM as captured by fillInStackTrace. |
Throwable |
Throwable.initCause(Throwable cause)
Initialize the cause of this Throwable. |
void |
Thread.stop(Throwable t)
Deprecated. unsafe operation, try not to use |
void |
Thread.UncaughtExceptionHandler.uncaughtException(Thread thr,
Throwable exc)
Invoked by the virtual machine with the dying thread and the uncaught exception. |
void |
ThreadGroup.uncaughtException(Thread thread,
Throwable t)
When a Thread in this ThreadGroup does not catch an exception, the virtual machine calls this method. |
| Methods in java.lang that throw Throwable | |
protected void |
Object.finalize()
Called on an object by the Virtual Machine at most once, at some point after the Object is determined unreachable but before it is destroyed. |
| Constructors in java.lang with parameters of type Throwable | |
Throwable(String message,
Throwable cause)
Instantiate this Throwable with the given message and cause. |
|
Throwable(Throwable cause)
Instantiate this Throwable with the given cause. |
|
Error(String s,
Throwable cause)
Create an error with a message and a cause. |
|
Error(Throwable cause)
Create an error with a given cause, and a message of cause == null ? null : cause.toString(). |
|
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(). |
|
RuntimeException(String s,
Throwable cause)
Create an exception with a message and a cause. |
|
RuntimeException(Throwable cause)
Create an exception with the given cause, and a message of cause == null ? null : cause.toString(). |
|
ClassNotFoundException(String s,
Throwable ex)
Create an exception with a message and chain it to the exception which occurred while loading the class. |
|
IllegalArgumentException(String message,
Throwable cause)
Constructs a IllegalArgumentException using
the specified error message, which should give further details
as to the reason for this exception. |
|
IllegalArgumentException(Throwable cause)
Constructs a IllegalArgumentException using
the specified cause Throwable, which may be used
to provide additional history, with regards to the root of the
problem. |
|
UnsupportedOperationException(String message,
Throwable cause)
Constructs a UnsupportedOperationException using
the specified error message, which should give further details
as to the reason for this exception. |
|
UnsupportedOperationException(Throwable cause)
Constructs a UnsupportedOperationException using
the specified cause Throwable, which may be used
to provide additional history, with regards to the root of the
problem. |
|
IllegalStateException(String message,
Throwable cause)
Constructs a IllegalStateException using
the specified error message, which should give further details
as to the reason for this exception. |
|
IllegalStateException(Throwable cause)
Constructs a IllegalStateException using
the specified cause Throwable, which may be used
to provide additional history, with regards to the root of the
problem. |
|
SecurityException(String message,
Throwable cause)
Constructs a SecurityException using
the specified error message, which should give further details
as to the reason for this exception. |
|
SecurityException(Throwable cause)
Constructs a SecurityException using
the specified cause Throwable, which may be used
to provide additional history, with regards to the root of the
problem. |
|
ExceptionInInitializerError(Throwable t)
Creates an error an saves a reference to the Throwable
object. |
|
TypeNotPresentException(String typeName,
Throwable cause)
Constructs a TypeNotPresentException for
the supplied type. |
|
|
|||||||||
| Home >> All >> java >> [ lang overview ] | PREV NEXT | ||||||||