Name
Exception
Synopsis
Exception is the base class for Java language exceptions.
Exceptions represent non-fatal error conditions that applications may be
able to recover from. Exception is derived from the
Throwable class, which is also the parent of
Error. However, exceptions derived from
Error differ from those derived from
Exception in that they represent conditions from which
application code would not usually be expected to recover.
Methods that throw Exceptions are required to include
a throws clause in their declarations, except under
one condition: methods are not obliged to declare any exceptions that
derive from the RuntimeException class. These types of
exceptions typically indicate a programming error that cannot be recovered
from.
This class is the same as its J2SE equivalent, apart from its inability to be serialized.
public class Exception extends Throwable {
// Public Constructors
public Exception();
public Exception( String s);
}
Subclasses
java.io.IOException, ClassNotFoundException, IllegalAccessException, InstantiationException, InterruptedException, RuntimeException, javax.microedition.midlet.MIDletStateChangeException, javax.microedition.rms.RecordStoreException
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access