gnu.mapping
public class WrappedException extends RuntimeException
Constructor Summary | |
---|---|
WrappedException()
Create a new WrappedException. | |
WrappedException(String message)
Create a new WrappedException.
| |
WrappedException(Throwable e)
Create a new WrappedException wrapping an existing exception.
| |
WrappedException(String message, Throwable e)
Create a new WrappedException from an existing exception.
|
Method Summary | |
---|---|
Throwable | getException()
Return the embedded exception, if any.
|
String | toString()
Convert this exception to a string.
|
static RuntimeException | wrapIfNeeded(Throwable ex) Coerce argument to a RuntimeException. |
Parameters: message The error or warning message.
The existing exception will be embedded in the new one, and its message will become the default message for the WrappedException.
Parameters: e The exception to be wrapped in a WrappedException.
The existing exception will be embedded in the new one, but the new exception will have its own message.
Parameters: message The detail message. e The exception to be wrapped in a WrappedException.
Returns: The embedded exception, or null if there is none.
Returns: A string version of this exception.