3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-03 01:50:07 +01:00

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(); String name = parameter.getName();
throw new InvalidUsageException("For parameter '" + name + "': " + e.getMessage(), this); 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) { } catch (Throwable t) {
throw new WrappedCommandException(t); throw new WrappedCommandException(t);
} }