Name
Error
Synopsis
Error is a subclass of Throwable.
It is the base class for exceptions that are not likely to be recoverable
by application code, but also do not represent programming errors (and hence
are not derived from RuntimeException). Methods that might
throw Errors are not required to indicate that
fact by including a throws declaration. In the same
manner, code that calls such a method is not required to catch the
Error.
The number of Error subclasses defined by CLDC is much
less than the number that exist in J2SE, primarily because the cause of
most errors on this platform is device-specific and therefore not
susceptible to common handling by platform-independent code. Errors that are
reported as such in J2SE are often regarded as terminal conditions
that should halt the execution of the virtual machine in CLDC.
This class is the same as its J2SE equivalent, apart from its inability to be serialized.
public class Error extends Throwable {
// Public Constructors
public Error();
public Error( String s);
}
Subclasses
VirtualMachineError
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