public class NotImplementedException extends UnsupportedOperationException
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.
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); } }This class was originally added in Lang 2.0, but removed in 3.0.
Constructor and Description |
---|
NotImplementedException(String message)
Constructs a NotImplementedException.
|
NotImplementedException(String message,
String code)
Constructs a NotImplementedException.
|
NotImplementedException(String message,
Throwable cause)
Constructs a NotImplementedException.
|
NotImplementedException(String message,
Throwable cause,
String code)
Constructs a NotImplementedException.
|
NotImplementedException(Throwable cause)
Constructs a NotImplementedException.
|
NotImplementedException(Throwable cause,
String code)
Constructs a NotImplementedException.
|
Modifier and Type | Method and Description |
---|---|
String |
getCode()
Obtain the not implemented code.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public NotImplementedException(String message)
message
- description of the exceptionpublic NotImplementedException(Throwable cause)
cause
- cause of the exceptionpublic NotImplementedException(String message, Throwable cause)
message
- description of the exceptioncause
- cause of the exceptionpublic NotImplementedException(String message, String code)
message
- description of the exceptioncode
- code indicating a resource for more information regarding the lack of implementationpublic NotImplementedException(Throwable cause, String code)
cause
- cause of the exceptioncode
- code indicating a resource for more information regarding the lack of implementationpublic NotImplementedException(String message, Throwable cause, String code)
message
- description of the exceptioncause
- cause of the exceptioncode
- code indicating a resource for more information regarding the lack of implementationpublic String getCode()
Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.