aboutsummaryrefslogtreecommitdiffstats
path: root/netx/net/sourceforge/jnlp/splashscreen/parts
diff options
context:
space:
mode:
authorJiri Vanek <[email protected]>2013-09-25 18:50:18 +0200
committerJiri Vanek <[email protected]>2013-09-25 18:50:18 +0200
commit19e74fe5dacd03e0cb5582f840e15262e39fe24f (patch)
tree38ffc4f47f7641f8d20ba0e0e8a97a97ffb1db64 /netx/net/sourceforge/jnlp/splashscreen/parts
parentfcd5c4c69fc5ea84b04f309eb40e295eab921fd8 (diff)
Introduced logging bottleneck
Diffstat (limited to 'netx/net/sourceforge/jnlp/splashscreen/parts')
-rw-r--r--netx/net/sourceforge/jnlp/splashscreen/parts/InformationElement.java3
-rw-r--r--netx/net/sourceforge/jnlp/splashscreen/parts/JEditorPaneBasedExceptionDialog.java15
2 files changed, 8 insertions, 10 deletions
diff --git a/netx/net/sourceforge/jnlp/splashscreen/parts/InformationElement.java b/netx/net/sourceforge/jnlp/splashscreen/parts/InformationElement.java
index 01e2655..1590831 100644
--- a/netx/net/sourceforge/jnlp/splashscreen/parts/InformationElement.java
+++ b/netx/net/sourceforge/jnlp/splashscreen/parts/InformationElement.java
@@ -45,6 +45,7 @@ import java.util.List;
import net.sourceforge.jnlp.InformationDesc;
import net.sourceforge.jnlp.JNLPFile;
import net.sourceforge.jnlp.runtime.Translator;
+import net.sourceforge.jnlp.util.logging.OutputController;
/**
* This class is wrapper arround <information> tag which should
@@ -227,7 +228,7 @@ public class InformationElement {
ie.addDescription(file.getInformation().getDescriptionStrict(InfoItem.descriptionKindToolTip), InfoItem.descriptionKindToolTip);
return ie;
} catch (Exception ex) {
- ex.printStackTrace();
+ OutputController.getLogger().log(OutputController.Level.ERROR_ALL, ex);
String message = Translator.R(InfoItem.SPLASH + "errorInInformation");
InformationElement ie = new InformationElement();
ie.setHomepage("");
diff --git a/netx/net/sourceforge/jnlp/splashscreen/parts/JEditorPaneBasedExceptionDialog.java b/netx/net/sourceforge/jnlp/splashscreen/parts/JEditorPaneBasedExceptionDialog.java
index e7e1779..02110ce 100644
--- a/netx/net/sourceforge/jnlp/splashscreen/parts/JEditorPaneBasedExceptionDialog.java
+++ b/netx/net/sourceforge/jnlp/splashscreen/parts/JEditorPaneBasedExceptionDialog.java
@@ -65,6 +65,7 @@ import javax.swing.event.HyperlinkListener;
import net.sourceforge.jnlp.LaunchException;
import net.sourceforge.jnlp.about.AboutDialog;
import net.sourceforge.jnlp.runtime.Translator;
+import net.sourceforge.jnlp.util.logging.OutputController;
public class JEditorPaneBasedExceptionDialog extends JDialog implements HyperlinkListener {
@@ -107,7 +108,7 @@ public class JEditorPaneBasedExceptionDialog extends JDialog implements Hyperlin
Icon icon = new ImageIcon(this.getClass().getResource("/net/sourceforge/jnlp/resources/warning.png"));
iconLabel.setIcon(icon);
} catch (Exception lex) {
- lex.printStackTrace();
+ OutputController.getLogger().log(OutputController.Level.ERROR_ALL, lex);
}
htmlErrorAndHelpPanel.addHyperlinkListener(this);
homeButton.setVisible(false);
@@ -198,7 +199,7 @@ public class JEditorPaneBasedExceptionDialog extends JDialog implements Hyperlin
try{
AboutDialog.display(true);
}catch(Exception ex){
- ex.printStackTrace();
+ OutputController.getLogger().log(OutputController.Level.ERROR_ALL, ex);
JOptionPane.showConfirmDialog(JEditorPaneBasedExceptionDialog.this, ex);
}
}
@@ -228,8 +229,8 @@ public class JEditorPaneBasedExceptionDialog extends JDialog implements Hyperlin
Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
clipboard.setContents(data, data);
} catch (Exception ex) {
+ OutputController.getLogger().log(OutputController.Level.ERROR_ALL, ex);
JOptionPane.showMessageDialog(this, Translator.R(InfoItem.SPLASH + "cantCopyEx"));
- ex.printStackTrace();
}
} else {
JOptionPane.showMessageDialog(this, Translator.R(InfoItem.SPLASH + "noExRecorded"));
@@ -302,18 +303,14 @@ public class JEditorPaneBasedExceptionDialog extends JDialog implements Hyperlin
if (exception == null) {
return "";
}
- StringWriter sw = new StringWriter();
- exception.printStackTrace(new PrintWriter(sw));
- return sw.toString();
+ return OutputController.exceptionToString(exception);
}
public static String[] getExceptionStackTraceAsStrings(Throwable exception) {
if (exception == null) {
return new String[0];
}
- StringWriter sw = new StringWriter();
- exception.printStackTrace(new PrintWriter(sw));
- return sw.toString().split("\n");
+ return OutputController.exceptionToString(exception).split("\n");
}
@Override