Skip to content

Commit

Permalink
Caught JLine sneaky throw properly.
Browse files Browse the repository at this point in the history
  • Loading branch information
MattGill98 committed Aug 12, 2019
1 parent e874701 commit d0004f8
Showing 1 changed file with 5 additions and 2 deletions.
Expand Up @@ -579,8 +579,11 @@ private String retry(int times) throws CommandException {
try {
char[] mpvArr = super.readPassword(prompt);
mpv = mpvArr != null ? new String(mpvArr) : null;
} catch (Throwable t) {
throw new CommandException(STRINGS.get("no.console"), t);
} catch (Exception ex) {
if (ex instanceof IOException) {
throw new CommandException(STRINGS.get("no.console"), ex);
}
throw ex;
}
if (mpv == null)
throw new CommandException(STRINGS.get("no.console"));
Expand Down

0 comments on commit d0004f8

Please sign in to comment.