OSDN Git Service

fix: fix crash logic
authorhizumiaoba <56146205+hizumiaoba@users.noreply.github.com>
Wed, 4 May 2022 11:49:35 +0000 (20:49 +0900)
committerhizumiaoba <56146205+hizumiaoba@users.noreply.github.com>
Wed, 4 May 2022 11:49:35 +0000 (20:49 +0900)
src/com/ranfa/main/DelesteRandomSelector.java

index 4c8b687..f75e060 100644 (file)
@@ -295,11 +295,11 @@ public class DelesteRandomSelector extends JFrame {
        }, es).whenCompleteAsync((ret, ex) -> {
                if(ex != null) {
                        logger.error("Exception was thrown during concurrent process", ex);
        }, es).whenCompleteAsync((ret, ex) -> {
                if(ex != null) {
                        logger.error("Exception was thrown during concurrent process", ex);
-                       CrashHandler handle = new CrashHandler(ex);
+                       CrashHandler handle = new CrashHandler(ex.getMessage(), ex);
                        if(ex instanceof NullPointerException) {
                                handle.execute();
                        }
                        if(ex instanceof NullPointerException) {
                                handle.execute();
                        }
-                       handle = new CrashHandler(new IllegalStateException(ex));
+                       handle = new CrashHandler(ex.getMessage(), new IllegalStateException(ex));
                        handle.execute();
                }
        }, es);
                        handle.execute();
                }
        }, es);
@@ -315,11 +315,11 @@ public class DelesteRandomSelector extends JFrame {
        }, es).whenCompleteAsync((ret, ex) -> {
                if(ex != null) {
                        logger.error("Exception was thrown during concurrent process", ex);
        }, es).whenCompleteAsync((ret, ex) -> {
                if(ex != null) {
                        logger.error("Exception was thrown during concurrent process", ex);
-                       CrashHandler handle = new CrashHandler(ex);
+                       CrashHandler handle = new CrashHandler(ex.getMessage(), ex);
                        if(ex instanceof NullPointerException) {
                                handle.execute();
                        }
                        if(ex instanceof NullPointerException) {
                                handle.execute();
                        }
-                       handle = new CrashHandler(new IllegalStateException(ex));
+                       handle = new CrashHandler(ex.getMessage(), new IllegalStateException(ex));
                        handle.execute();
                }
                this.logger.debug("Loading settings...");
                        handle.execute();
                }
                this.logger.debug("Loading settings...");
@@ -353,7 +353,7 @@ public class DelesteRandomSelector extends JFrame {
        }, es).whenCompleteAsync((ret, ex) -> {
                if(ex != null) {
                        logger.error("Exception was thrown during concurrent process", ex);
        }, es).whenCompleteAsync((ret, ex) -> {
                if(ex != null) {
                        logger.error("Exception was thrown during concurrent process", ex);
-                       CrashHandler handle = new CrashHandler(new IllegalStateException(ex));
+                       CrashHandler handle = new CrashHandler(ex.getMessage(), new IllegalStateException(ex));
                        handle.execute();
                }
        }, es);
                        handle.execute();
                }
        }, es);
@@ -490,7 +490,7 @@ public class DelesteRandomSelector extends JFrame {
                                logger.error("Exception was thrown during concurrent process", ex);
                                if(ex instanceof IllegalArgumentException)
                                        return; // ignore
                                logger.error("Exception was thrown during concurrent process", ex);
                                if(ex instanceof IllegalArgumentException)
                                        return; // ignore
-                               CrashHandler handle = new CrashHandler(new IllegalStateException(ex));
+                               CrashHandler handle = new CrashHandler(ex.getMessage(), new IllegalStateException(ex));
                                handle.execute();
                        }
                }, es);
                                handle.execute();
                        }
                }, es);
@@ -513,7 +513,7 @@ public class DelesteRandomSelector extends JFrame {
                }, es).whenCompleteAsync((ret, ex) -> {
                        if(ex != null) {
                                logger.error("Exception was thrown during concurrent process", ex);
                }, es).whenCompleteAsync((ret, ex) -> {
                        if(ex != null) {
                                logger.error("Exception was thrown during concurrent process", ex);
-                               CrashHandler handle = new CrashHandler(new IllegalStateException(ex));
+                               CrashHandler handle = new CrashHandler(ex.getMessage(), new IllegalStateException(ex));
                                handle.execute();
                        }
                }, es);
                                handle.execute();
                        }
                }, es);
@@ -569,7 +569,7 @@ public class DelesteRandomSelector extends JFrame {
                }, es).whenCompleteAsync((ret, ex) -> {
                        if(ex != null) {
                                logger.error("Exception was thrown during concurrent process", ex);
                }, es).whenCompleteAsync((ret, ex) -> {
                        if(ex != null) {
                                logger.error("Exception was thrown during concurrent process", ex);
-                               CrashHandler handle = new CrashHandler(new IllegalStateException(ex));
+                               CrashHandler handle = new CrashHandler(ex.getMessage(), new IllegalStateException(ex));
                                handle.execute();
                        }
                }, es);
                                handle.execute();
                        }
                }, es);
@@ -583,7 +583,7 @@ public class DelesteRandomSelector extends JFrame {
                CompletableFuture.runAsync(impl, es).whenCompleteAsync((t, u) -> {
                        if(u != null) {
                                logger.warn("Exception while processing update manually.", u);
                CompletableFuture.runAsync(impl, es).whenCompleteAsync((t, u) -> {
                        if(u != null) {
                                logger.warn("Exception while processing update manually.", u);
-                               CrashHandler handle = new CrashHandler(new IllegalStateException(u));
+                               CrashHandler handle = new CrashHandler(u.getMessage(), new IllegalStateException(u));
                                handle.execute();
                                JOptionPane.showMessageDialog(null, "There was a problem during processing library update manually.\nIf this appears repeatedly, please contact developer with your app log.");
                        }
                                handle.execute();
                                JOptionPane.showMessageDialog(null, "There was a problem during processing library update manually.\nIf this appears repeatedly, please contact developer with your app log.");
                        }
@@ -641,7 +641,7 @@ public class DelesteRandomSelector extends JFrame {
                }, es).whenCompleteAsync((ret, ex) -> {
                        if(ex != null) {
                                logger.error("Exception was thrown during concurrent process", ex);
                }, es).whenCompleteAsync((ret, ex) -> {
                        if(ex != null) {
                                logger.error("Exception was thrown during concurrent process", ex);
-                               CrashHandler handle = new CrashHandler(new IllegalStateException(ex));
+                               CrashHandler handle = new CrashHandler(ex.getMessage(), new IllegalStateException(ex));
                                handle.execute();
                        }
                }, es);
                                handle.execute();
                        }
                }, es);
@@ -727,7 +727,7 @@ public class DelesteRandomSelector extends JFrame {
                        labelToolProgress.setText("Information parse Complete.");
                        if(ex != null) {
                                logger.error("Exception was thrown during concurrent process", ex);
                        labelToolProgress.setText("Information parse Complete.");
                        if(ex != null) {
                                logger.error("Exception was thrown during concurrent process", ex);
-                               CrashHandler handle = new CrashHandler(new IllegalStateException(ex));
+                               CrashHandler handle = new CrashHandler(ex.getMessage(), new IllegalStateException(ex));
                                handle.execute();
                        }
                }, es);
                                handle.execute();
                        }
                }, es);