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 /sfx2/qa | |
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 'sfx2/qa')
-rw-r--r-- | sfx2/qa/complex/sfx2/DocumentMetadataAccess.java | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/sfx2/qa/complex/sfx2/DocumentMetadataAccess.java b/sfx2/qa/complex/sfx2/DocumentMetadataAccess.java index 3843cb90e398..f2944f019b8f 100644 --- a/sfx2/qa/complex/sfx2/DocumentMetadataAccess.java +++ b/sfx2/qa/complex/sfx2/DocumentMetadataAccess.java @@ -46,7 +46,6 @@ import com.sun.star.lang.XComponent; import com.sun.star.lang.XServiceInfo; import com.sun.star.lang.IllegalArgumentException; import com.sun.star.lang.WrappedTargetException; -import com.sun.star.lang.WrappedTargetRuntimeException; import com.sun.star.beans.XPropertySet; import com.sun.star.beans.PropertyValue; import com.sun.star.beans.StringPair; @@ -863,28 +862,9 @@ public class DocumentMetadataAccess // utilities ------------------------------------------------------------- - public void report2(Exception e) - { - if (e instanceof WrappedTargetException) - { - System.out.println("Cause:"); - Exception cause = (Exception) - (((WrappedTargetException)e).TargetException); - System.out.println(cause.toString()); - report2(cause); - } else if (e instanceof WrappedTargetRuntimeException) { - System.out.println("Cause:"); - Exception cause = (Exception) - (((WrappedTargetRuntimeException)e).TargetException); - System.out.println(cause.toString()); - report2(cause); - } - } - public void report(Exception e) { System.out.println("Exception occurred:"); e.printStackTrace(System.err); - report2(e); fail(); } |