From: hizumiaoba <56146205+hizumiaoba@users.noreply.github.com> Date: Wed, 4 May 2022 11:49:35 +0000 (+0900) Subject: fix: fix crash logic X-Git-Url: http://git.osdn.net/view?p=delesterandomselector%2FDelesteRandomSelector.git;a=commitdiff_plain;h=8e19ce28a6977822ed429396f8ccebb69764c59d fix: fix crash logic --- diff --git a/src/com/ranfa/main/DelesteRandomSelector.java b/src/com/ranfa/main/DelesteRandomSelector.java index 4c8b687..f75e060 100644 --- a/src/com/ranfa/main/DelesteRandomSelector.java +++ b/src/com/ranfa/main/DelesteRandomSelector.java @@ -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); - CrashHandler handle = new CrashHandler(ex); + CrashHandler handle = new CrashHandler(ex.getMessage(), ex); if(ex instanceof NullPointerException) { handle.execute(); } - handle = new CrashHandler(new IllegalStateException(ex)); + handle = new CrashHandler(ex.getMessage(), new IllegalStateException(ex)); 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); - CrashHandler handle = new CrashHandler(ex); + CrashHandler handle = new CrashHandler(ex.getMessage(), ex); 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..."); @@ -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); - CrashHandler handle = new CrashHandler(new IllegalStateException(ex)); + CrashHandler handle = new CrashHandler(ex.getMessage(), new IllegalStateException(ex)); 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 - CrashHandler handle = new CrashHandler(new IllegalStateException(ex)); + CrashHandler handle = new CrashHandler(ex.getMessage(), new IllegalStateException(ex)); 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); - CrashHandler handle = new CrashHandler(new IllegalStateException(ex)); + CrashHandler handle = new CrashHandler(ex.getMessage(), new IllegalStateException(ex)); 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); - CrashHandler handle = new CrashHandler(new IllegalStateException(ex)); + CrashHandler handle = new CrashHandler(ex.getMessage(), new IllegalStateException(ex)); 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); - 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."); } @@ -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); - CrashHandler handle = new CrashHandler(new IllegalStateException(ex)); + CrashHandler handle = new CrashHandler(ex.getMessage(), new IllegalStateException(ex)); 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); - CrashHandler handle = new CrashHandler(new IllegalStateException(ex)); + CrashHandler handle = new CrashHandler(ex.getMessage(), new IllegalStateException(ex)); handle.execute(); } }, es);