diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/decompilers/impl/KrakatauDisassembler.java b/src/main/java/the/bytecode/club/bytecodeviewer/decompilers/impl/KrakatauDisassembler.java index a12ff775..3f3a64fb 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/decompilers/impl/KrakatauDisassembler.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/decompilers/impl/KrakatauDisassembler.java @@ -35,6 +35,7 @@ import the.bytecode.club.bytecodeviewer.util.ZipUtils; import java.io.*; import static the.bytecode.club.bytecodeviewer.Constants.*; +import static the.bytecode.club.bytecodeviewer.translation.TranslatedStrings.DEV_MODE_SIMULATED_ERROR; /** * Krakatau Java Disassembler Wrapper, requires Python 2.7 @@ -105,6 +106,10 @@ public class KrakatauDisassembler extends AbstractDecompiler log.append(NL).append(NL).append(TranslatedStrings.EXIT_VALUE_IS).append(" ").append(exitValue); returnString = log.toString(); + //handle simulated errors + if(Constants.DEV_FLAG_DECOMPILERS_SIMULATED_ERRORS) + throw new RuntimeException(DEV_MODE_SIMULATED_ERROR.toString()); + // update the string on a successful disassemble returnString = DiskReader.loadAsString(tempDirectory.getAbsolutePath() + FS + cn.name + ".j"); }