| java.lang.Object java.lang.Throwable java.lang.Exception java.lang.RuntimeException java.lang.UnsupportedOperationException org.apache.commons.lang.NotImplementedException
NotImplementedException | public class NotImplementedException extends UnsupportedOperationException implements Nestable(Code) | | 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);
}
}
author: Matthew Hawthorne author: Stephen Colebourne since: 2.0 version: $Id: NotImplementedException.java 437554 2006-08-28 06:21:41Z bayard $ |
Method Summary | |
public Throwable | getCause() Gets the root cause of this exception. | public String | getMessage() Gets the combined the error message of this and any nested errors. | public String | getMessage(int index) Returns the error message of the Throwable in the chain
of Throwable s at the specified index, numbered from 0. | public String[] | getMessages() Returns the error message of this and any nested Throwable objects. | public Throwable | getThrowable(int index) Returns the Throwable in the chain by index. | public int | getThrowableCount() Returns the number of nested Throwable s represented by
this Nestable , including this Nestable . | public Throwable[] | getThrowables() Returns this Nestable and any nested Throwable s
in an array of Throwable s, one element for each
Throwable . | public int | indexOfThrowable(Class type) Returns the index of the first occurrence of the specified type. | public int | indexOfThrowable(Class type, int fromIndex) Returns the index of the first occurrence of the specified type starting
from the specified index. | final public void | printPartialStackTrace(PrintWriter out) Prints the stack trace for this exception only (root cause not included)
using the specified writer. | public void | printStackTrace() Prints the stack trace of this exception. | public void | printStackTrace(PrintStream out) Prints the stack trace of this exception to the specified stream. | public void | printStackTrace(PrintWriter out) Prints the stack trace of this exception to the specified writer. |
NotImplementedException | public NotImplementedException()(Code) | | Constructs a new NotImplementedException with default message.
since: 2.1 |
NotImplementedException | public NotImplementedException(String msg)(Code) | | Constructs a new NotImplementedException with specified
detail message.
Parameters: msg - the error message. |
NotImplementedException | public NotImplementedException(Throwable cause)(Code) | | Constructs a new NotImplementedException with specified
nested Throwable and default message.
Parameters: cause - the exception that caused this exception to be thrown since: 2.1 |
NotImplementedException | public NotImplementedException(String msg, Throwable cause)(Code) | | Constructs a new NotImplementedException with specified
detail message and nested Throwable .
Parameters: msg - the error message Parameters: cause - the exception that caused this exception to be thrown since: 2.1 |
NotImplementedException | public NotImplementedException(Class clazz)(Code) | | Constructs a new NotImplementedException referencing the specified class.
Parameters: clazz - the Class that has not implemented the method |
getCause | public Throwable getCause()(Code) | | Gets the root cause of this exception.
the root cause of this exception. since: 2.1 |
getMessage | public String getMessage()(Code) | | Gets the combined the error message of this and any nested errors.
the error message since: 2.1 |
getMessage | public String getMessage(int index)(Code) | | Returns the error message of the Throwable in the chain
of Throwable s at the specified index, numbered from 0.
Parameters: index - the index of the Throwable in the chain the error message, or null if the Throwable at thespecified index in the chain does not contain a message throws: IndexOutOfBoundsException - if the index argument isnegative or not less than the count of Throwable s in the chain since: 2.1 |
getMessages | public String[] getMessages()(Code) | | Returns the error message of this and any nested Throwable objects.
Each throwable returns a message, a null string is included in the array if
there is no message for a particular Throwable .
the error messages since: 2.1 |
getThrowable | public Throwable getThrowable(int index)(Code) | | Returns the Throwable in the chain by index.
Parameters: index - the index to retrieve the Throwable throws: IndexOutOfBoundsException - if the index argument isnegative or not less than the count of Throwable s in the chain since: 2.1 |
getThrowableCount | public int getThrowableCount()(Code) | | Returns the number of nested Throwable s represented by
this Nestable , including this Nestable .
the throwable count since: 2.1 |
getThrowables | public Throwable[] getThrowables()(Code) | | Returns this Nestable and any nested Throwable s
in an array of Throwable s, one element for each
Throwable .
the Throwable s since: 2.1 |
indexOfThrowable | public int indexOfThrowable(Class type)(Code) | | Returns the index of the first occurrence of the specified type.
If there is no match, -1 is returned.
Parameters: type - the type to search for index of the first occurrence of the type in the chain, or -1 ifthe type is not found since: 2.1 |
indexOfThrowable | public int indexOfThrowable(Class type, int fromIndex)(Code) | | Returns the index of the first occurrence of the specified type starting
from the specified index. If there is no match, -1 is returned.
Parameters: type - the type to search for Parameters: fromIndex - the index of the starting position in the chain to be searched index of the first occurrence of the type in the chain, or -1 ifthe type is not found throws: IndexOutOfBoundsException - if the fromIndex argumentis negative or not less than the count of Throwable s in the chain since: 2.1 |
printPartialStackTrace | final public void printPartialStackTrace(PrintWriter out)(Code) | | Prints the stack trace for this exception only (root cause not included)
using the specified writer.
Parameters: out - the writer to write to since: 2.1 |
printStackTrace | public void printStackTrace()(Code) | | Prints the stack trace of this exception.
Includes information from the exception, if any, which caused this exception.
since: 2.1 |
printStackTrace | public void printStackTrace(PrintStream out)(Code) | | Prints the stack trace of this exception to the specified stream.
Includes information from the exception, if any, which caused this exception.
Parameters: out - the stream to write to since: 2.1 |
printStackTrace | public void printStackTrace(PrintWriter out)(Code) | | Prints the stack trace of this exception to the specified writer.
Includes information from the exception, if any, which caused this exception.
Parameters: out - the writer to write to since: 2.1 |
|
|