mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 17:27:38 +00:00
Fixed an issue where the ParametricCallable wasn't forwarding InvocationTargetExpections caused by CommandExceptions properly
Fixes WORLDEDIT-3364
This commit is contained in:
parent
c957ffb95a
commit
b9801ebf57
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user