提交 927d9477 编写于 作者: K kohsuke

display the whole stack trace, not just the message.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@2155 71c3de6d-444a-0410-be80-ed276b4c234a
上级 cbe5b66b
......@@ -2,6 +2,8 @@ package hudson.jnlp;
import javax.swing.SwingUtilities;
import javax.swing.JOptionPane;
import java.io.StringWriter;
import java.io.PrintWriter;
/**
* @author Kohsuke Kawaguchi
......@@ -25,7 +27,10 @@ public class Main {
public void error(final Throwable t) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
JOptionPane.showMessageDialog(frame,t,"Error",
StringWriter sw = new StringWriter();
t.printStackTrace(new PrintWriter(sw));
JOptionPane.showMessageDialog(
frame,sw.toString(),"Error",
JOptionPane.ERROR_MESSAGE);
System.exit(-1);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册