public
classNotImplementedException
implements
Nestable
Overview
Inheritance
Members
Usage
Source
Books
Since2.0
Version$Id: NotIm
Author(s)Matthew Hawthorne, Stephen Colebourne
Thrown to indicate that a block of code has not been implemented.
This exception supplements UnsupportedOperationException
by providing a more semantically rich description of the problem.
NotImplementedException represents the case where the
author has yet to implement the logic at this point in the program.
This can act as an exception based TODO tag.
Because this logic might be within a catch block, this exception
suports exception chaining.
public void foo() {
try {
// do something that throws an Exception
} catch (Exception ex) {
// don't know what to do here yet
throw new NotImplementedException("TODO", ex);
}
}
Thrown to indicate that a block of code has not been implemented. This exception supplements
UnsupportedOperationExceptionby providing a more semantically rich description of the problem.NotImplementedExceptionrepresents the case where the author has yet to implement the logic at this point in the program. This can act as an exception based TODO tag. Because this logic might be within a catch block, this exception suports exception chaining.public void foo() { try { // do something that throws an Exception } catch (Exception ex) { // don't know what to do here yet throw new NotImplementedException("TODO", ex); } }