Unchecked Exception

A unchecked exception is an programming language exception that need not be caught. As such, the compiler does no check to see if it is handled at compile time.

Language Support

Java

In Java, classes that derive from RuntimeException and Error are unchecked whilst other classes that derive from Exception and Throwable are checked at compile time.

Compare: CheckedException

C++

All exceptions may be optionally caught and so all exception handling is unchecked (at compile time anyway).

Although "exception specifications" exist, they are generally agreed to be broken and are unused. See http://www.boost.org/more/lib_guide.htm#Exception-specification for some more on this. In any case, they do not offer the compile-time verification of Java exception specifications, the best you will get is a runtime error.


CategoryException


EditText of this page (last edited June 11, 2005) or FindPage with title or text search