mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-04-20 07:46:05 -04:00
Log StackTrace for ArrayIndexOutOfBoundsExceptions instead of showing error popup
This commit is contained in:
parent
02073e1868
commit
ba909647dc
@ -57,6 +57,7 @@ import javafx.scene.layout.StackPane;
|
||||
import javafx.stage.Modality;
|
||||
import javafx.stage.Stage;
|
||||
import javafx.stage.StageStyle;
|
||||
import org.apache.commons.lang3.exception.ExceptionUtils;
|
||||
import org.bitcoinj.store.BlockStoreException;
|
||||
import org.bouncycastle.jce.provider.BouncyCastleProvider;
|
||||
import org.controlsfx.dialog.Dialogs;
|
||||
@ -116,7 +117,11 @@ public class BitsquareApp extends Application {
|
||||
log.error("Uncaught Exception from thread " + Thread.currentThread().getName());
|
||||
log.error("Uncaught Exception throwableMessage= " + throwable.getMessage());
|
||||
throwable.printStackTrace();
|
||||
UserThread.execute(() -> showErrorPopup(throwable, false));
|
||||
if (throwable instanceof ArrayIndexOutOfBoundsException) {
|
||||
log.error("StackTrace:\n" + ExceptionUtils.getStackTrace(throwable));
|
||||
} else {
|
||||
UserThread.execute(() -> showErrorPopup(throwable, false));
|
||||
}
|
||||
}
|
||||
};
|
||||
Thread.setDefaultUncaughtExceptionHandler(handler);
|
||||
|
Loading…
x
Reference in New Issue
Block a user