Fixing NPE possibility.

This commit is contained in:
Rob Greene 2022-01-08 21:27:44 -06:00
parent 38dc876ba8
commit 53c860f102

View File

@ -14,8 +14,8 @@ public class PrintExceptionMessageHandler implements IExecutionExceptionHandler
ex.printStackTrace(System.err);
}
else {
// bold red error message
cmd.getErr().println(cmd.getColorScheme().errorText(ex.getMessage()));
// bold red error message (+ "" is to handle null messages)
cmd.getErr().println(cmd.getColorScheme().errorText(ex.getMessage() + ""));
}
return cmd.getExitCodeExceptionMapper() != null