aboutsummaryrefslogtreecommitdiffstats
path: root/netx/net/sourceforge/jnlp/LaunchException.java
diff options
context:
space:
mode:
authorJiri Vanek <[email protected]>2013-01-30 16:51:08 +0100
committerJiri Vanek <[email protected]>2013-01-30 16:51:08 +0100
commitc06c5ab6dc8a8aa1b41af190188d1de99345810f (patch)
treedd2e2f2b01ce8a2acb4a4d9bbe7cf04a64af96bf /netx/net/sourceforge/jnlp/LaunchException.java
parent924f9299d39b9bd985c58fde4ea2968b8ebdb229 (diff)
Splashscreen error report made more detailed by stored LaunchErrors
* netx/net/sourceforge/jnlp/LaunchException.java: (LaunchExceptionWithStamp) new inner class for storing timestamp togetehr with error. (launchExceptionChain) new static list to capture LaunchErrors during runtime. * /netx/net/sourceforge/jnlp/resources/Messages.properties: * netx/net/sourceforge/jnlp/resources/Messages_cs_CZ.properties: Added explanation string * netx/net/sourceforge/jnlp/splashscreen/parts/JEditorPaneBasedExceptionDialog.java: Is now displaying launchExceptionChain in its error report and is copying it to clipboard. * tests/unit/net/sourceforge/jnlp/splashscreen/parts/JEditorPaneBasedExceptionDialogTest.java: (getTextTest) adapted calls of getText for new Date.
Diffstat (limited to 'netx/net/sourceforge/jnlp/LaunchException.java')
-rw-r--r--netx/net/sourceforge/jnlp/LaunchException.java43
1 files changed, 43 insertions, 0 deletions
diff --git a/netx/net/sourceforge/jnlp/LaunchException.java b/netx/net/sourceforge/jnlp/LaunchException.java
index 6c194ed..818df1e 100644
--- a/netx/net/sourceforge/jnlp/LaunchException.java
+++ b/netx/net/sourceforge/jnlp/LaunchException.java
@@ -16,6 +16,11 @@
package net.sourceforge.jnlp;
+import java.util.Collections;
+import java.util.Date;
+import java.util.LinkedList;
+import java.util.List;
+
/**
* Thrown when a JNLP application, applet, or installer could not
* be created.
@@ -25,6 +30,29 @@ package net.sourceforge.jnlp;
*/
public class LaunchException extends Exception {
+
+ public static class LaunchExceptionWithStamp{
+ private final LaunchException ex;
+ private final Date stamp;
+
+ private LaunchExceptionWithStamp(LaunchException ex) {
+ this.ex=ex;
+ this.stamp=new Date();
+ }
+
+ public LaunchException getEx() {
+ return ex;
+ }
+
+ public Date getStamp() {
+ return stamp;
+ }
+
+
+
+ }
+ private static final List<LaunchExceptionWithStamp> launchExceptionChain = Collections.synchronizedList(new LinkedList<LaunchExceptionWithStamp>());
+
private static final long serialVersionUID = 7283827853612357423L;
/** the file being launched */
@@ -54,6 +82,7 @@ public class LaunchException extends Exception {
this.summary = summary;
this.description = description;
this.severity = severity;
+ saveLaunchException(this);
}
/**
@@ -61,6 +90,7 @@ public class LaunchException extends Exception {
*/
public LaunchException(Throwable cause) {
super(cause);
+ saveLaunchException(this);
}
/**
@@ -68,6 +98,7 @@ public class LaunchException extends Exception {
*/
public LaunchException(String message, Throwable cause) {
super(message, cause);
+ saveLaunchException(this);
}
/**
@@ -78,6 +109,7 @@ public class LaunchException extends Exception {
*/
public LaunchException(String message) {
super(message);
+ saveLaunchException(this);
}
/**
@@ -117,4 +149,15 @@ public class LaunchException extends Exception {
return severity;
}
+ private synchronized void saveLaunchException(LaunchException ex) {
+ launchExceptionChain.add(new LaunchExceptionWithStamp(ex));
+
+ }
+
+ public synchronized static List<LaunchExceptionWithStamp> getLaunchExceptionChain() {
+ return launchExceptionChain;
+ }
+
+
+
}