Fixed an issue where the ParametricCallable wasn't forwarding InvocationTargetExpections caused by CommandExceptions properly

Fixes WORLDEDIT-3364
Dieser Commit ist enthalten in:
Wyatt Childers 2016-07-17 19:02:43 -04:00
Ursprung c957ffb95a
Commit b9801ebf57

Datei anzeigen

@ -240,6 +240,11 @@ class ParametricCallable implements CommandCallable {
String name = parameter.getName();
throw new InvalidUsageException("For parameter '" + name + "': " + e.getMessage(), this);
} catch (InvocationTargetException e) {
if (e.getCause() instanceof CommandException) {
throw (CommandException) e.getCause();
}
throw new WrappedCommandException(e);
} catch (Throwable t) {
throw new WrappedCommandException(t);
}