summaryrefslogtreecommitdiff
path: root/jurt/com/sun/star/comp
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-08-15 16:17:25 +0200
committerNoel Grandin <noel@peralex.com>2014-09-25 13:47:25 +0200
commit83636d2c09802aeeb1b30078022d228d04da21eb (patch)
tree8a0c619e16c1f6b5388939d5da2956f7ef758c19 /jurt/com/sun/star/comp
parentcf49392511e98851174b353782df9eb6bac46f77 (diff)
java: when rethrowing exceptions, store the original cause
so that we get a nice complete stacktrace when it hits the final handler Change-Id: Iec4fcc15a2a25c55f591b5e069dce3d010197a90
Diffstat (limited to 'jurt/com/sun/star/comp')
-rw-r--r--jurt/com/sun/star/comp/connections/PipedConnection.java7
-rw-r--r--jurt/com/sun/star/comp/loader/FactoryHelper.java14
-rw-r--r--jurt/com/sun/star/comp/servicemanager/ServiceManager.java2
3 files changed, 9 insertions, 14 deletions
diff --git a/jurt/com/sun/star/comp/connections/PipedConnection.java b/jurt/com/sun/star/comp/connections/PipedConnection.java
index d48b2a63df0e..8cae64d3cdfc 100644
--- a/jurt/com/sun/star/comp/connections/PipedConnection.java
+++ b/jurt/com/sun/star/comp/connections/PipedConnection.java
@@ -20,12 +20,9 @@ package com.sun.star.comp.connections;
import com.sun.star.comp.loader.FactoryHelper;
-
import com.sun.star.connection.XConnection;
-
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.lang.XSingleServiceFactory;
-
import com.sun.star.registry.XRegistryKey;
/**
@@ -121,7 +118,7 @@ public class PipedConnection implements XConnection {
wait(__waitTime);
}
catch(InterruptedException interruptedException) {
- throw new com.sun.star.io.IOException(interruptedException.toString());
+ throw new com.sun.star.io.IOException(interruptedException);
}
}
@@ -175,7 +172,7 @@ public class PipedConnection implements XConnection {
wait(__waitTime); // we wait for data or for the pipe to be closed
}
catch(InterruptedException interruptedException) {
- throw new com.sun.star.io.IOException(interruptedException.toString());
+ throw new com.sun.star.io.IOException(interruptedException);
}
}
diff --git a/jurt/com/sun/star/comp/loader/FactoryHelper.java b/jurt/com/sun/star/comp/loader/FactoryHelper.java
index 92b480174769..3fdbac487180 100644
--- a/jurt/com/sun/star/comp/loader/FactoryHelper.java
+++ b/jurt/com/sun/star/comp/loader/FactoryHelper.java
@@ -29,9 +29,7 @@ import com.sun.star.lang.XServiceInfo;
import com.sun.star.lang.XSingleServiceFactory;
import com.sun.star.lang.XSingleComponentFactory;
import com.sun.star.lang.XTypeProvider;
-
import com.sun.star.registry.XRegistryKey;
-
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.Type;
@@ -207,11 +205,11 @@ public class FactoryHelper {
else if (targetException instanceof com.sun.star.uno.RuntimeException)
throw (com.sun.star.uno.RuntimeException)targetException;
else
- throw new com.sun.star.uno.Exception( targetException.toString() );
+ throw new com.sun.star.uno.Exception( targetException );
} catch (IllegalAccessException illegalAccessException) {
- throw new com.sun.star.uno.Exception( illegalAccessException.toString() );
+ throw new com.sun.star.uno.Exception( illegalAccessException );
} catch (InstantiationException instantiationException) {
- throw new com.sun.star.uno.Exception( instantiationException.toString() );
+ throw new com.sun.star.uno.Exception( instantiationException );
}
}
@@ -283,11 +281,11 @@ public class FactoryHelper {
else if (targetException instanceof com.sun.star.uno.RuntimeException)
throw (com.sun.star.uno.RuntimeException)targetException;
else
- throw new com.sun.star.uno.Exception( targetException.toString() );
+ throw new com.sun.star.uno.Exception( targetException );
} catch (IllegalAccessException illegalAccessException) {
- throw new com.sun.star.uno.Exception( illegalAccessException.toString() );
+ throw new com.sun.star.uno.Exception( illegalAccessException );
} catch (InstantiationException instantiationException) {
- throw new com.sun.star.uno.Exception( instantiationException.toString() );
+ throw new com.sun.star.uno.Exception( instantiationException );
}
}
diff --git a/jurt/com/sun/star/comp/servicemanager/ServiceManager.java b/jurt/com/sun/star/comp/servicemanager/ServiceManager.java
index 38e5cb30646d..729fda5b2215 100644
--- a/jurt/com/sun/star/comp/servicemanager/ServiceManager.java
+++ b/jurt/com/sun/star/comp/servicemanager/ServiceManager.java
@@ -192,7 +192,7 @@ public class ServiceManager implements XMultiServiceFactory,
return factoriesByServiceNames.keySet().toArray(
new String[ factoriesByServiceNames.size() ] );
} catch(Exception ex) {
- throw new com.sun.star.uno.RuntimeException(ex.toString());
+ throw new com.sun.star.uno.RuntimeException(ex);
}
}