diff options
author | Noel Grandin <noel@peralex.com> | 2014-10-16 12:16:51 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-10-16 12:27:13 +0200 |
commit | 5cba8d44cabc3cbb18648efc9d8658d471b257e7 (patch) | |
tree | 7656e262fcc7b590c2c6a87f966e08956e2f14ec /qadevOOo/tests/java/mod/_forms | |
parent | 25d70197a4e428d1dbde59209505f76d33287416 (diff) |
java: when rethrowing, store the original exception
Change-Id: Idfca83a2a646acab90886c0ef9c30dd7d2fc8b53
Diffstat (limited to 'qadevOOo/tests/java/mod/_forms')
-rw-r--r-- | qadevOOo/tests/java/mod/_forms/ODatabaseForm.java | 5 | ||||
-rw-r--r-- | qadevOOo/tests/java/mod/_forms/OFileControlModel.java | 8 |
2 files changed, 4 insertions, 9 deletions
diff --git a/qadevOOo/tests/java/mod/_forms/ODatabaseForm.java b/qadevOOo/tests/java/mod/_forms/ODatabaseForm.java index e1a2c68e61ae..8a1b43c88f56 100644 --- a/qadevOOo/tests/java/mod/_forms/ODatabaseForm.java +++ b/qadevOOo/tests/java/mod/_forms/ODatabaseForm.java @@ -330,10 +330,9 @@ public class ODatabaseForm extends TestCase { try { dbTools.initTestTableUsingJDBC(tableName, srcInf); } catch (java.sql.SQLException e) { - e.printStackTrace(log); - throw new StatusException(Status.failed("Couldn't " + " init test table. SQLException...")); + throw new StatusException(e, Status.failed("Couldn't " + " init test table. SQLException...")); } catch (java.lang.ClassNotFoundException e) { - throw new StatusException(Status.failed("Couldn't " + "register mysql driver")); + throw new StatusException(e, Status.failed("Couldn't " + "register mysql driver")); } } diff --git a/qadevOOo/tests/java/mod/_forms/OFileControlModel.java b/qadevOOo/tests/java/mod/_forms/OFileControlModel.java index d0644dbbc7cc..b44bbbb8a29a 100644 --- a/qadevOOo/tests/java/mod/_forms/OFileControlModel.java +++ b/qadevOOo/tests/java/mod/_forms/OFileControlModel.java @@ -102,9 +102,7 @@ public class OFileControlModel extends TestCase { log.println("creating a draw document"); xDrawDoc = SOF.createDrawDoc(null); } catch (com.sun.star.uno.Exception e) { - log.println("Can't create a document :"); - e.printStackTrace(log); - throw new StatusException(Status.failed("Can't create a document")); + throw new StatusException(e, Status.failed("Can't create a document")); } } @@ -176,9 +174,7 @@ public class OFileControlModel extends TestCase { aShape.setSize(size); aShape.setPosition(position); } catch (com.sun.star.uno.Exception e) { - // Some exception occurs.FAILED - log.println("Couldn't create a component " + e); - throw new StatusException(Status.failed("Can't create component")); + throw new StatusException(e, Status.failed("Can't create component")); } aShape.setControl(aControl); |