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);
|
||||||
|
|
||||||
String text = textArea.getText();
|
try
|
||||||
byte[] compiledClass = compileMode.getCompiler().compile(text, viewer.cn.name);
|
|
||||||
|
|
||||||
if (compiledClass != null)
|
|
||||||
{
|
{
|
||||||
try {
|
String text = textArea.getText();
|
||||||
|
byte[] compiledClass = compileMode.getCompiler().compile(text, viewer.cn.name);
|
||||||
|
|
||||||
|
if (compiledClass != null)
|
||||||
|
{
|
||||||
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