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 /sw/qa/complex | |
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 'sw/qa/complex')
-rw-r--r-- | sw/qa/complex/writer/LoadSaveTest.java | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/sw/qa/complex/writer/LoadSaveTest.java b/sw/qa/complex/writer/LoadSaveTest.java index e6027b6a7e94..f617a93d8b42 100644 --- a/sw/qa/complex/writer/LoadSaveTest.java +++ b/sw/qa/complex/writer/LoadSaveTest.java @@ -20,8 +20,6 @@ package complex.writer; import com.sun.star.uno.UnoRuntime; import com.sun.star.uno.XComponentContext; -import com.sun.star.lang.WrappedTargetException; -import com.sun.star.lang.WrappedTargetRuntimeException; import com.sun.star.lang.EventObject; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.lang.XComponent; @@ -165,29 +163,10 @@ public class LoadSaveTest public void disposing(EventObject Event) { } } - 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); - } - } - void report(Exception e) { System.out.println("Exception occurred:"); System.out.println(e.toString()); e.printStackTrace(System.err); - report2(e); // failed(); } |