summaryrefslogtreecommitdiff
path: root/xmerge/source/bridge/java/XMergeBridge.java
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-10-16 12:19:14 +0200
committerNoel Grandin <noel@peralex.com>2014-10-16 12:27:15 +0200
commit9341bf3dc38b2cc117ffbe12ff057511ed6e046d (patch)
tree3a54c1764eb0e3106695292a737944507d3b4fb6 /xmerge/source/bridge/java/XMergeBridge.java
parentb2f69f626409442d1f0ca5049b946946ce9b01d8 (diff)
java: when rethrowing, store the original exception
Change-Id: I34ce000c48d2d79bfec854c8dd55d12f2bee29c7
Diffstat (limited to 'xmerge/source/bridge/java/XMergeBridge.java')
-rw-r--r--xmerge/source/bridge/java/XMergeBridge.java22
1 files changed, 10 insertions, 12 deletions
diff --git a/xmerge/source/bridge/java/XMergeBridge.java b/xmerge/source/bridge/java/XMergeBridge.java
index 30fe66b48d99..da0d31a180b8 100644
--- a/xmerge/source/bridge/java/XMergeBridge.java
+++ b/xmerge/source/bridge/java/XMergeBridge.java
@@ -312,11 +312,11 @@ public class XMergeBridge {
}
catch (IOException e){
- throw new com.sun.star.uno.RuntimeException(e.getMessage());
+ throw new com.sun.star.uno.RuntimeException(e);
}
catch (Exception e){
- throw new com.sun.star.uno.RuntimeException("Xmerge Exception");
+ throw new com.sun.star.uno.RuntimeException(e);
}
}
@@ -476,13 +476,10 @@ public class XMergeBridge {
}
ConverterInfoMgr.removeByJar(jarName);
}
- catch (StackOverflowError sOE){
- System.out.println("\nERROR : Stack Overflow. \n Increase of the JRE by adding the following line to the end of the javarc file \n \"-Xss1m\"\n");
-
- }
- catch (Exception e) {
- System.out.println("Error:"+e);
- throw new IOException("Xmerge Exception");
+ catch (Exception ex1) {
+ IOException ex2 = new IOException();
+ ex2.initCause(ex1);
+ throw ex2;
}
}
else{
@@ -513,9 +510,10 @@ public class XMergeBridge {
catch (StackOverflowError sOE){
System.out.println("\nERROR : Stack Overflow. \n Increase of the JRE by adding the following line to the end of the javarc file \n \"-Xss1m\"\n");
}
- catch (Exception e) {
- System.out.println("Error:"+e);
- throw new IOException("Xmerge Exception");
+ catch (Exception ex1) {
+ IOException ex2 = new IOException();
+ ex2.initCause(ex1);
+ throw ex2;
}