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 /ridljar | |
parent | cf49392511e98851174b353782df9eb6bac46f77 (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 'ridljar')
-rw-r--r-- | ridljar/com/sun/star/uno/Type.java | 2 | ||||
-rw-r--r-- | ridljar/com/sun/star/uno/UnoRuntime.java | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/ridljar/com/sun/star/uno/Type.java b/ridljar/com/sun/star/uno/Type.java index adbcebdd51c3..a4da5b1377d5 100644 --- a/ridljar/com/sun/star/uno/Type.java +++ b/ridljar/com/sun/star/uno/Type.java @@ -284,7 +284,7 @@ public class Type { Class.forName(i < 0 ? typeName : typeName.substring(0, i)), false, i >= 0); } catch (ClassNotFoundException e) { - throw new RuntimeException(e.toString()); + throw new RuntimeException(e); } } diff --git a/ridljar/com/sun/star/uno/UnoRuntime.java b/ridljar/com/sun/star/uno/UnoRuntime.java index 5576c2c08591..40403cdc3908 100644 --- a/ridljar/com/sun/star/uno/UnoRuntime.java +++ b/ridljar/com/sun/star/uno/UnoRuntime.java @@ -247,7 +247,7 @@ public class UnoRuntime { fs = TypeDescription.getTypeDescription(t). getFieldDescriptions(); } catch (ClassNotFoundException e) { - throw new java.lang.RuntimeException(e.toString()); + throw new java.lang.RuntimeException(e); } for (int i = 0; i< fs.length; ++i) { Type ft = new Type(fs[i].getTypeDescription()); @@ -263,7 +263,7 @@ public class UnoRuntime { return false; } } catch (IllegalAccessException e) { - throw new java.lang.RuntimeException(e.toString()); + throw new java.lang.RuntimeException(e); } } return true; @@ -338,7 +338,7 @@ public class UnoRuntime { } catch (java.lang.RuntimeException e) { throw e; } catch (java.lang.Exception e) { - throw new java.lang.RuntimeException(e.toString()); + throw new java.lang.RuntimeException(e); } case TypeClass.ENUM_value: try { @@ -347,7 +347,7 @@ public class UnoRuntime { } catch (java.lang.RuntimeException e) { throw e; } catch (java.lang.Exception e) { - throw new java.lang.RuntimeException(e.toString()); + throw new java.lang.RuntimeException(e); } default: throw new IllegalArgumentException( |