Krakatau Disassembler Simulated Errors

This commit is contained in:
Konloch 2024-10-02 19:26:08 -06:00
parent f7496036d2
commit 2611145662

AI 샘플 코드 생성 중입니다

Loading...

View File

@ -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");
}