diff options
author | Noel Grandin <noel@peralex.com> | 2014-12-10 13:35:17 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-12-10 13:37:24 +0200 |
commit | fd60dd5226b6cefb1eb621f8e479ba59bf11b0b7 (patch) | |
tree | 8508b20e7ed08bd11227551d3d57e7ce7a7e40d9 /javaunohelper | |
parent | 07c54fff7ad9da498acd482148e491b879766bd4 (diff) |
java: improve use of WrappedTargetException to set cause properly
since we introduced the new constructors that pass the cause all the
way up to java.lang.Throwable.
Also simplify some exeception printing sites, because Throwable
will correctly print out child exceptions for us.
Change-Id: Ibbecce3c6f971fbc80d6de2052ab4f33a4503c0a
Diffstat (limited to 'javaunohelper')
-rw-r--r-- | javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java | 6 | ||||
-rw-r--r-- | javaunohelper/com/sun/star/lib/uno/helper/PropertySetMixin.java | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java b/javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java index 47407b1e78ad..ed82d92a4870 100644 --- a/javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java +++ b/javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java @@ -688,11 +688,11 @@ XMultiPropertySet } catch (java.lang.NoSuchFieldException e) { - throw new WrappedTargetException("Field does not exist", this, e); + throw new WrappedTargetException(e, "Field does not exist", this, e); } catch (java.lang.IllegalAccessException e) { - throw new WrappedTargetException("", this ,e); + throw new WrappedTargetException(e, "", this ,e); } return ret; } @@ -808,7 +808,7 @@ XMultiPropertySet } catch(java.lang.Exception e) { - throw new WrappedTargetException("PropertySet.setPropertyValueNoBroadcast", this, e); + throw new WrappedTargetException(e, "PropertySet.setPropertyValueNoBroadcast", this, e); } } /** Retrieves the value of a property. This implementation presumes that the values are stored in member variables diff --git a/javaunohelper/com/sun/star/lib/uno/helper/PropertySetMixin.java b/javaunohelper/com/sun/star/lib/uno/helper/PropertySetMixin.java index 7e2af48e1e56..26d94649174a 100644 --- a/javaunohelper/com/sun/star/lib/uno/helper/PropertySetMixin.java +++ b/javaunohelper/com/sun/star/lib/uno/helper/PropertySetMixin.java @@ -479,7 +479,7 @@ public final class PropertySetMixin { } catch (UnknownPropertyException e) { continue; } catch (WrappedTargetException e) { - throw new WrappedTargetRuntimeException(e, + throw new WrappedTargetRuntimeException(e.getCause(), e.getMessage(), object, e.TargetException); } s[n++] = new PropertyValue(handleMap[i], i, value, state[0]); @@ -742,7 +742,7 @@ public final class PropertySetMixin { { throw new PropertyVetoException(e, name, object); } else { - throw new WrappedTargetException( + throw new WrappedTargetException(e.getCause(), e.getMessage(), object, e.TargetException); } } @@ -774,7 +774,7 @@ public final class PropertySetMixin { { throw new UnknownPropertyException(e, name, object); } else { - throw new WrappedTargetException( + throw new WrappedTargetException(e.getCause(), e.getMessage(), object, e.TargetException); } } |