mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-09-20 13:04:40 -04:00
Log StackTrace for ArrayIndexOutOfBoundsExceptions instead of showing error popup
This commit is contained in:
parent
02073e1868
commit
ba909647dc
1 changed files with 6 additions and 1 deletions
|
@ -57,6 +57,7 @@ import javafx.scene.layout.StackPane;
|
||||||
import javafx.stage.Modality;
|
import javafx.stage.Modality;
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
import javafx.stage.StageStyle;
|
import javafx.stage.StageStyle;
|
||||||
|
import org.apache.commons.lang3.exception.ExceptionUtils;
|
||||||
import org.bitcoinj.store.BlockStoreException;
|
import org.bitcoinj.store.BlockStoreException;
|
||||||
import org.bouncycastle.jce.provider.BouncyCastleProvider;
|
import org.bouncycastle.jce.provider.BouncyCastleProvider;
|
||||||
import org.controlsfx.dialog.Dialogs;
|
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 from thread " + Thread.currentThread().getName());
|
||||||
log.error("Uncaught Exception throwableMessage= " + throwable.getMessage());
|
log.error("Uncaught Exception throwableMessage= " + throwable.getMessage());
|
||||||
throwable.printStackTrace();
|
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);
|
Thread.setDefaultUncaughtExceptionHandler(handler);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue