public interface ExceptionConverter
Throwables into an appropriate
CommandException, throwing InvocationCommandException if
the exception cannot be converted into a friendlier exception.
The purpose of this class is to allow commands to throw domain-specific exceptions without having to worry with printing helpful error messages to the user as a registered instance of this class will perform that job.
| Modifier and Type | Method and Description |
|---|---|
void |
convert(Throwable t)
Attempt to convert the given throwable into a friendly
CommandException. |
void convert(Throwable t) throws CommandException
CommandException.
If the exception is not recognized, then
InvocationCommandException should be thrown to wrap the exception.
t - the throwableCommandException - a command exceptionCopyright © 2015. All Rights Reserved.