diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-15 16:17:25 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-09-25 13:47:25 +0200 |
commit | 83636d2c09802aeeb1b30078022d228d04da21eb (patch) | |
tree | 8a0c619e16c1f6b5388939d5da2956f7ef758c19 /bridges/test | |
parent | dbaccess: C2668: ambiguous call to overloaded function (diff) | |
download | core-83636d2c09802aeeb1b30078022d228d04da21eb.tar.gz core-83636d2c09802aeeb1b30078022d228d04da21eb.zip |
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 'bridges/test')
-rw-r--r-- | bridges/test/java_uno/nativethreadpool/Relay.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bridges/test/java_uno/nativethreadpool/Relay.java b/bridges/test/java_uno/nativethreadpool/Relay.java index 8e371b203957..c5322b64c53e 100644 --- a/bridges/test/java_uno/nativethreadpool/Relay.java +++ b/bridges/test/java_uno/nativethreadpool/Relay.java @@ -43,9 +43,9 @@ public final class Relay implements XRelay, XSource { } catch (RuntimeException e) { throw e; } catch (com.sun.star.uno.Exception e) { - throw new WrappedTargetRuntimeException(e.toString(), this, e); + throw new WrappedTargetRuntimeException(e.getMessage(), this, e); } catch (Exception e) { - throw new com.sun.star.uno.RuntimeException(e.toString(), this); + throw new com.sun.star.uno.RuntimeException(e, this); } final XAcceptor acceptor = Acceptor.create(context); final XBridgeFactory factory; @@ -55,7 +55,7 @@ public final class Relay implements XRelay, XSource { context.getServiceManager().createInstanceWithContext( "com.sun.star.bridge.BridgeFactory", context)); } catch (com.sun.star.uno.Exception e) { - throw new WrappedTargetRuntimeException(e.toString(), this, e); + throw new WrappedTargetRuntimeException(e.getMessage(), this, e); } new Thread() { @Override @@ -85,7 +85,7 @@ public final class Relay implements XRelay, XSource { Thread.sleep(3000); // wait for new thread to accept connection } catch (InterruptedException e) { Thread.currentThread().interrupt(); - throw new com.sun.star.uno.RuntimeException(e.toString(), this); + throw new com.sun.star.uno.RuntimeException(e, this); } } |