previous | start | next

Errors

Error classes can also be thrown, but are not derived from Exception.

Error types are also unchecked (but they are unchecked Errors, not unchecked Exceptions).

Errors and unchecked exceptions are both unchecked throwables.

The convention is that errors should only be thrown by the java virtual machine to indicate conditions that make it impossible to continue (e.g. disk failure, stack overflow, etc.)

User class methods should not throw Error or any of its derived class types.



previous | start | next