making code window to show full stacktrace in case of error
This commit is contained in:
@@ -27,6 +27,8 @@ import org.jetbrains.jet.lang.resolve.AnalyzingUtils;
|
|||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
import java.io.PrintWriter;
|
||||||
|
import java.io.StringWriter;
|
||||||
|
|
||||||
public class BytecodeToolwindow extends JPanel {
|
public class BytecodeToolwindow extends JPanel {
|
||||||
private static final int UPDATE_DELAY = 500;
|
private static final int UPDATE_DELAY = 500;
|
||||||
@@ -93,7 +95,9 @@ public class BytecodeToolwindow extends JPanel {
|
|||||||
AnalyzingUtils.checkForSyntacticErrors(file);
|
AnalyzingUtils.checkForSyntacticErrors(file);
|
||||||
state.compile(file);
|
state.compile(file);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return e.toString();
|
StringWriter out = new StringWriter(1024);
|
||||||
|
e.printStackTrace(new PrintWriter(out));
|
||||||
|
return out.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user