Better Compiler Error Handling
This commit is contained in:
parent
9af03cb465
commit
f3c7c1881a
1 changed files with 10 additions and 7 deletions
|
@ -79,20 +79,23 @@ public class ResourceViewPanel
|
||||||
nl + "Keep in mind most decompilers cannot produce compilable classes" +
|
nl + "Keep in mind most decompilers cannot produce compilable classes" +
|
||||||
nl + nl);
|
nl + nl);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
String text = textArea.getText();
|
String text = textArea.getText();
|
||||||
byte[] compiledClass = compileMode.getCompiler().compile(text, viewer.cn.name);
|
byte[] compiledClass = compileMode.getCompiler().compile(text, viewer.cn.name);
|
||||||
|
|
||||||
if (compiledClass != null)
|
if (compiledClass != null)
|
||||||
{
|
{
|
||||||
try {
|
|
||||||
ClassNode newNode = JarUtils.getNode(compiledClass);
|
ClassNode newNode = JarUtils.getNode(compiledClass);
|
||||||
BytecodeViewer.updateNode(viewer.cn, newNode);
|
BytecodeViewer.updateNode(viewer.cn, newNode);
|
||||||
errConsole.finished();
|
errConsole.finished();
|
||||||
return true;
|
return true;
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
errConsole.pretty();
|
errConsole.pretty();
|
||||||
errConsole.setVisible(true);
|
errConsole.setVisible(true);
|
||||||
|
|
Loading…
Reference in a new issue