Skip to content

Commit

Permalink
fix: prevent NPE when calling ConsoleContentPanel.showMessage
Browse files Browse the repository at this point in the history
Signed-off-by: Fred Bricon <[email protected]>
  • Loading branch information
fbricon committed Oct 18, 2023
1 parent 96fc899 commit c120c49
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,16 @@ private void showDetail() {
}

public void showMessage(String message) {
if (consoleView == null) {
return;
}
consoleView.print(message, ConsoleViewContentType.SYSTEM_OUTPUT);
}

public void showError(Throwable exception) {
if (consoleView == null) {
return;
}
String stacktrace = getStackTrace(exception);
consoleView.print(stacktrace, ConsoleViewContentType.ERROR_OUTPUT);
}
Expand Down

0 comments on commit c120c49

Please sign in to comment.