From ab2ce702d9c3c95941bbe7ae11cb86849a808aa9 Mon Sep 17 00:00:00 2001 From: Konloch Date: Wed, 2 Oct 2024 14:25:13 -0600 Subject: [PATCH] Cleanup Javap Exceptions --- .../bytecodeviewer/decompilers/impl/JavapDisassembler.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/decompilers/impl/JavapDisassembler.java b/src/main/java/the/bytecode/club/bytecodeviewer/decompilers/impl/JavapDisassembler.java index 8e384af8..f7fbb3c3 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/decompilers/impl/JavapDisassembler.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/decompilers/impl/JavapDisassembler.java @@ -27,6 +27,7 @@ import the.bytecode.club.bytecodeviewer.decompilers.AbstractDecompiler; import the.bytecode.club.bytecodeviewer.gui.components.JFrameConsolePrintStream; import the.bytecode.club.bytecodeviewer.resources.ExternalResources; import the.bytecode.club.bytecodeviewer.translation.TranslatedStrings; +import the.bytecode.club.bytecodeviewer.util.ExceptionUtils; import the.bytecode.club.bytecodeviewer.util.TempFile; import java.io.File; @@ -118,11 +119,7 @@ public class JavapDisassembler extends AbstractDecompiler } catch (Throwable e) { - StringWriter exceptionWriter = new StringWriter(); - e.printStackTrace(new PrintWriter(exceptionWriter)); - e.printStackTrace(); - - exception += NL + NL + exceptionWriter; + exception = NL + NL + ExceptionUtils.exceptionToString(e); } finally {