Skip to content

Commit

Permalink
Merge pull request #3381 from lusarz/refactor-bisq-app-throwable
Browse files Browse the repository at this point in the history
Refactor BisqApp - update error popup message build
  • Loading branch information
ripcurlx authored Oct 14, 2019
2 parents 94b12a7 + 584e552 commit 4277ec8
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions desktop/src/main/java/bisq/desktop/app/BisqApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
import java.awt.GraphicsEnvironment;
import java.awt.Rectangle;

import java.util.Objects;
import java.util.concurrent.TimeUnit;
import java.util.function.Consumer;

Expand Down Expand Up @@ -180,12 +181,10 @@ public void handleUncaughtException(Throwable throwable, boolean doShutDown) {
try {
try {
if (!popupOpened) {
String message = throwable.getMessage();
popupOpened = true;
if (message != null)
new Popup<>().error(message).onClose(() -> popupOpened = false).show();
else
new Popup<>().error(throwable.toString()).onClose(() -> popupOpened = false).show();
new Popup<>().error(Objects.requireNonNullElse(throwable.getMessage(), throwable.toString()))
.onClose(() -> popupOpened = false)
.show();
}
} catch (Throwable throwable3) {
log.error("Error at displaying Throwable.");
Expand Down

0 comments on commit 4277ec8

Please sign in to comment.