diff --git a/modules/common-cli/src/main/java/org/dcache/util/cli/AnnotatedCommandExecutor.java b/modules/common-cli/src/main/java/org/dcache/util/cli/AnnotatedCommandExecutor.java index c24a68ce544..d056518cb26 100644 --- a/modules/common-cli/src/main/java/org/dcache/util/cli/AnnotatedCommandExecutor.java +++ b/modules/common-cli/src/main/java/org/dcache/util/cli/AnnotatedCommandExecutor.java @@ -123,15 +123,12 @@ public Serializable execute(Args arguments) throws CommandException { for (Handler handler : _handlers) { handler.apply(command, arguments); } + return command.call(); } catch (IllegalAccessException e) { throw new RuntimeException("This is a bug. Please notify " + "support@dcache.org", e); } catch (IllegalArgumentException e) { throw new CommandSyntaxException(e.getMessage()); - } - - try { - return command.call(); } catch (CommandException e) { throw e; } catch (RuntimeException e) {