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 e70b754 commit 57c2ab5
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
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 57c2ab5

Please sign in to comment.