Skip to content

Commit

Permalink
Fixed an issue where the ParametricCallable wasn't forwarding Invocat…
Browse files Browse the repository at this point in the history
…ionTargetExpections caused by CommandExceptions properly

Fixes WORLDEDIT-3364
  • Loading branch information
DarkArc committed Jul 17, 2016
1 parent 52274e8 commit 9effc50
Showing 1 changed file with 5 additions and 0 deletions.
Expand Up @@ -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);
}
Expand Down

0 comments on commit 9effc50

Please sign in to comment.