Fixed error message for SubedCommand run exceptions
This commit is contained in:
parent
59ab689a36
commit
eed6f43aea
@ -113,8 +113,7 @@ public class ScriptExecution extends Command {
|
|||||||
e.getLocalizedMessage() + ")", //$NON-NLS-1$
|
e.getLocalizedMessage() + ")", //$NON-NLS-1$
|
||||||
e, this);
|
e, this);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new CommandRunException(
|
throw new CommandRunException("Unable to read script", //$NON-NLS-1$
|
||||||
"Unable to read script (" + e.getLocalizedMessage() + ")", //$NON-NLS-1$ //$NON-NLS-2$
|
|
||||||
e, this);
|
e, this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -122,6 +122,9 @@ public class SubedCommand implements ICommandProvider, ICommand {
|
|||||||
try {
|
try {
|
||||||
executeSub(args[0], Arrays.copyOfRange(args, 1, args.length));
|
executeSub(args[0], Arrays.copyOfRange(args, 1, args.length));
|
||||||
} catch (CommandRunException e) {
|
} catch (CommandRunException e) {
|
||||||
|
if (e.getSource() != null) {
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
throw new CommandRunException(CommandRunExceptionType.USAGE,
|
throw new CommandRunException(CommandRunExceptionType.USAGE,
|
||||||
e.getLocalizedMessage(), e, this);
|
e.getLocalizedMessage(), e, this);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user