diff options
author | Noel Grandin <noel@peralex.com> | 2014-10-16 14:44:23 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-10-17 08:26:22 +0200 |
commit | 93056481e85548e1228d3b88e53ee59ed983576e (patch) | |
tree | 9187af96ec8799f883bfefe0667553b2cc3c905a /qadevOOo | |
parent | 03c7c26cbe7d75f103515e62dc39103f11d4637f (diff) |
java: when rethrowing exceptions, store the original
Change-Id: I8a2a264597d0b1ae06b08136fea36003682380b5
Diffstat (limited to 'qadevOOo')
-rw-r--r-- | qadevOOo/runner/util/BasicMacroTools.java | 11 | ||||
-rw-r--r-- | qadevOOo/tests/java/ifc/beans/_XPropertyWithState.java | 3 | ||||
-rw-r--r-- | qadevOOo/tests/java/mod/_dbaccess/TableWindowAccessibility.java | 3 |
3 files changed, 5 insertions, 12 deletions
diff --git a/qadevOOo/runner/util/BasicMacroTools.java b/qadevOOo/runner/util/BasicMacroTools.java index 0a2a856f774f..ead35dd78b40 100644 --- a/qadevOOo/runner/util/BasicMacroTools.java +++ b/qadevOOo/runner/util/BasicMacroTools.java @@ -109,14 +109,9 @@ public class BasicMacroTools { private static XURLTransformer makeParser(XMultiServiceFactory mMSF) throws java.lang.Exception { - try { - return UnoRuntime.queryInterface( - XURLTransformer.class, mMSF.createInstance( - "com.sun.star.util.URLTransformer")); - } catch (Exception e) { - throw new Exception("could not create UTL-Transformer " + - e.toString()); - } + return UnoRuntime.queryInterface( + XURLTransformer.class, mMSF.createInstance( + "com.sun.star.util.URLTransformer")); } public void loadLibrary(String LibraryName, String LibraryURL) diff --git a/qadevOOo/tests/java/ifc/beans/_XPropertyWithState.java b/qadevOOo/tests/java/ifc/beans/_XPropertyWithState.java index 6bc506ea2b8d..9f93e00209d7 100644 --- a/qadevOOo/tests/java/ifc/beans/_XPropertyWithState.java +++ b/qadevOOo/tests/java/ifc/beans/_XPropertyWithState.java @@ -56,8 +56,7 @@ public class _XPropertyWithState extends MultiMethodTest { oObj.getDefaultAsProperty(); } catch (com.sun.star.lang.WrappedTargetException e){ - e.printStackTrace(log); - throw new StatusException(Status.failed("'com.sun.star.lang.WrappedTargetException' was thrown")); + throw new StatusException(e, Status.failed("'com.sun.star.lang.WrappedTargetException' was thrown")); } tRes.tested("getDefaultAsProperty()", true); diff --git a/qadevOOo/tests/java/mod/_dbaccess/TableWindowAccessibility.java b/qadevOOo/tests/java/mod/_dbaccess/TableWindowAccessibility.java index 17839ab97c3b..aaa4303b2a90 100644 --- a/qadevOOo/tests/java/mod/_dbaccess/TableWindowAccessibility.java +++ b/qadevOOo/tests/java/mod/_dbaccess/TableWindowAccessibility.java @@ -164,8 +164,7 @@ public class TableWindowAccessibility extends TestCase { store.storeAsURL(aFile,new PropertyValue[]{}); log.println("... done"); } catch (com.sun.star.uno.Exception e) { - e.printStackTrace(log); - throw new StatusException(Status.failed("Couldn't register object")); + throw new StatusException(e, Status.failed("Couldn't register object")); } isolConnection = UnoRuntime.queryInterface( |