Permalink
Browse files

Fixed an issue where the ParametricCallable wasn't forwarding Invocat…

…ionTargetExpections caused by CommandExceptions properly

Fixes WORLDEDIT-3364
  • Loading branch information...
DarkArc committed Jul 17, 2016
1 parent e70b754 commit 57c2ab5f191bb4a348de26005367dff32b78e535
@@ -240,6 +240,11 @@ public Object call(String stringArguments, CommandLocals locals, String[] parent
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);
}

0 comments on commit 57c2ab5

Please sign in to comment.