diff options
Diffstat (limited to 'qadevOOo/tests/java')
47 files changed, 106 insertions, 233 deletions
diff --git a/qadevOOo/tests/java/ifc/beans/_XMultiPropertyStates.java b/qadevOOo/tests/java/ifc/beans/_XMultiPropertyStates.java index 81836c2c9b26..600be127c70a 100644 --- a/qadevOOo/tests/java/ifc/beans/_XMultiPropertyStates.java +++ b/qadevOOo/tests/java/ifc/beans/_XMultiPropertyStates.java @@ -133,9 +133,7 @@ public class _XMultiPropertyStates extends MultiMethodTest { prop = xPropSetInfo.getPropertyByName(names[i]); } catch(com.sun.star.beans.UnknownPropertyException e) { - log.println("couldn't get property info: " + e.toString()); - throw new StatusException(Status.failed - ("couldn't get property info")); + throw new StatusException(e, Status.failed("couldn't get property info")); } if ( (prop.Attributes & PropertyAttribute.MAYBEDEFAULT) != 0){ log.println("Property " + names[i] + diff --git a/qadevOOo/tests/java/ifc/beans/_XPropertyWithState.java b/qadevOOo/tests/java/ifc/beans/_XPropertyWithState.java index f7cf1114fdf9..6bc506ea2b8d 100644 --- a/qadevOOo/tests/java/ifc/beans/_XPropertyWithState.java +++ b/qadevOOo/tests/java/ifc/beans/_XPropertyWithState.java @@ -93,8 +93,7 @@ public class _XPropertyWithState extends MultiMethodTest { oObj.setToDefaultAsProperty(); } 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("setToDefaultAsProperty()", true); diff --git a/qadevOOo/tests/java/ifc/document/_Settings.java b/qadevOOo/tests/java/ifc/document/_Settings.java index 01e7be08f35e..a0b0f87b6b8c 100644 --- a/qadevOOo/tests/java/ifc/document/_Settings.java +++ b/qadevOOo/tests/java/ifc/document/_Settings.java @@ -46,9 +46,9 @@ public class _Settings extends MultiPropertyTest { testProperty("PrinterIndependentLayout", oldVal, newVal); } catch (com.sun.star.beans.UnknownPropertyException e) { - throw new StatusException(Status.failed("the property 'PrinterIndependentLayout' is unknown.")); + throw new StatusException(e, Status.failed("the property 'PrinterIndependentLayout' is unknown.")); } catch (com.sun.star.lang.WrappedTargetException e) { - throw new StatusException(Status.failed("the property 'PrinterIndependentLayout' could not be tested.")); + throw new StatusException(e, Status.failed("the property 'PrinterIndependentLayout' could not be tested.")); } } diff --git a/qadevOOo/tests/java/ifc/io/_XActiveDataControl.java b/qadevOOo/tests/java/ifc/io/_XActiveDataControl.java index 33a2bd09b78e..32ce987f6f5d 100644 --- a/qadevOOo/tests/java/ifc/io/_XActiveDataControl.java +++ b/qadevOOo/tests/java/ifc/io/_XActiveDataControl.java @@ -138,8 +138,7 @@ public class _XActiveDataControl extends MultiMethodTest { try { Thread.sleep(200); } catch (InterruptedException e) { - e.printStackTrace(log) ; - throw new StatusException(Status.failed(e.getMessage())); + throw new StatusException(e, Status.failed(e.getMessage())); } } @@ -177,8 +176,7 @@ public class _XActiveDataControl extends MultiMethodTest { try { Thread.sleep(200); } catch (InterruptedException e) { - e.printStackTrace(log) ; - throw new StatusException(Status.failed(e.getMessage())); + throw new StatusException(e, Status.failed(e.getMessage())); } // check that no removed listener's method was called @@ -203,8 +201,7 @@ public class _XActiveDataControl extends MultiMethodTest { try { Thread.sleep(200); } catch (InterruptedException e) { - e.printStackTrace(log) ; - throw new StatusException(Status.failed(e.getMessage())); + throw new StatusException(e, Status.failed(e.getMessage())); } // check, if any error occurred diff --git a/qadevOOo/tests/java/ifc/sheet/_XFormulaQuery.java b/qadevOOo/tests/java/ifc/sheet/_XFormulaQuery.java index 7a41fc0603c0..b4958937ee2f 100644 --- a/qadevOOo/tests/java/ifc/sheet/_XFormulaQuery.java +++ b/qadevOOo/tests/java/ifc/sheet/_XFormulaQuery.java @@ -63,8 +63,7 @@ public class _XFormulaQuery extends MultiMethodTest { try { mxCell = oSheet.getCellByPosition(15, 15); } catch (com.sun.star.lang.IndexOutOfBoundsException e) { - throw new StatusException( - Status.failed("Couldn't get initial cell")); + throw new StatusException(e, Status.failed("Couldn't get initial cell")); } } diff --git a/qadevOOo/tests/java/ifc/sheet/_XSheetAuditing.java b/qadevOOo/tests/java/ifc/sheet/_XSheetAuditing.java index ea2eec6a845e..e17e82599950 100644 --- a/qadevOOo/tests/java/ifc/sheet/_XSheetAuditing.java +++ b/qadevOOo/tests/java/ifc/sheet/_XSheetAuditing.java @@ -80,7 +80,7 @@ public class _XSheetAuditing extends MultiMethodTest { xPrecedentAddress = xSheet.getCellByPosition(precedentAddress.Column, precedentAddress.Row); } catch(com.sun.star.lang.IndexOutOfBoundsException e) { - throw new StatusException(Status.failed("Invalid cell addresses in object relations.")); + throw new StatusException(e, Status.failed("Invalid cell addresses in object relations.")); } } diff --git a/qadevOOo/tests/java/mod/_adabas/ODriver.java b/qadevOOo/tests/java/mod/_adabas/ODriver.java index d97206a53a1e..c1af17d5ad80 100644 --- a/qadevOOo/tests/java/mod/_adabas/ODriver.java +++ b/qadevOOo/tests/java/mod/_adabas/ODriver.java @@ -67,8 +67,7 @@ public class ODriver extends TestCase { oObj = (XInterface)Param.getMSF(). createInstance("com.sun.star.comp.sdbcx.adabas.ODriver"); } catch (com.sun.star.uno.Exception e) { - e.printStackTrace(log); - throw new StatusException(Status.failed("Couldn't create object")); + throw new StatusException(e, Status.failed("Couldn't create object")); } log.println("creating a new environment for object"); diff --git a/qadevOOo/tests/java/mod/_ado/ODriver.java b/qadevOOo/tests/java/mod/_ado/ODriver.java index 83c9a87b579a..db4b9b466de6 100644 --- a/qadevOOo/tests/java/mod/_ado/ODriver.java +++ b/qadevOOo/tests/java/mod/_ado/ODriver.java @@ -66,8 +66,7 @@ public class ODriver extends TestCase { oObj = (XInterface)Param.getMSF(). createInstance("com.sun.star.comp.sdbc.ado.ODriver"); } catch (com.sun.star.uno.Exception e) { - e.printStackTrace(log); - throw new StatusException(Status.failed("Couldn't create object")); + throw new StatusException(e, Status.failed("Couldn't create object")); } log.println("creating a new environment for object"); diff --git a/qadevOOo/tests/java/mod/_dbaccess/ConnectionLineAccessibility.java b/qadevOOo/tests/java/mod/_dbaccess/ConnectionLineAccessibility.java index 6988bc70e9e7..1b81aa16ebf5 100644 --- a/qadevOOo/tests/java/mod/_dbaccess/ConnectionLineAccessibility.java +++ b/qadevOOo/tests/java/mod/_dbaccess/ConnectionLineAccessibility.java @@ -115,8 +115,7 @@ public class ConnectionLineAccessibility extends TestCase } catch (com.sun.star.uno.Exception e) { - e.printStackTrace(log); - throw new StatusException(Status.failed("Couldn't create instance")); + throw new StatusException(e, Status.failed("Couldn't create instance")); } String mysqlURL = (String) Param.get("mysql.url"); @@ -154,26 +153,22 @@ public class ConnectionLineAccessibility extends TestCase } catch (com.sun.star.lang.WrappedTargetException e) { - e.printStackTrace(log); - throw new StatusException(Status.failed( + throw new StatusException(e, Status.failed( "Couldn't set property value")); } catch (com.sun.star.lang.IllegalArgumentException e) { - e.printStackTrace(log); - throw new StatusException(Status.failed( + throw new StatusException(e, Status.failed( "Couldn't set property value")); } catch (com.sun.star.beans.PropertyVetoException e) { - e.printStackTrace(log); - throw new StatusException(Status.failed( + throw new StatusException(e, Status.failed( "Couldn't set property value")); } catch (com.sun.star.beans.UnknownPropertyException e) { - e.printStackTrace(log); - throw new StatusException(Status.failed( + throw new StatusException(e, Status.failed( "Couldn't set property value")); } @@ -192,8 +187,7 @@ public class ConnectionLineAccessibility extends TestCase } 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( @@ -236,8 +230,7 @@ public class ConnectionLineAccessibility extends TestCase } catch (com.sun.star.sdbc.SQLException e2) { - e2.printStackTrace(log); - throw new StatusException(Status.failed("SQLException")); + throw new StatusException(e2, Status.failed("SQLException")); } } @@ -260,26 +253,22 @@ public class ConnectionLineAccessibility extends TestCase } catch (com.sun.star.lang.WrappedTargetException e) { - e.printStackTrace(log); - throw new StatusException(Status.failed( + throw new StatusException(e, Status.failed( "Couldn't set property value")); } catch (com.sun.star.lang.IllegalArgumentException e) { - e.printStackTrace(log); - throw new StatusException(Status.failed( + throw new StatusException(e, Status.failed( "Couldn't set property value")); } catch (com.sun.star.beans.PropertyVetoException e) { - e.printStackTrace(log); - throw new StatusException(Status.failed( + throw new StatusException(e, Status.failed( "Couldn't set property value")); } catch (com.sun.star.beans.UnknownPropertyException e) { - e.printStackTrace(log); - throw new StatusException(Status.failed( + throw new StatusException(e, Status.failed( "Couldn't set property value")); } @@ -295,28 +284,23 @@ public class ConnectionLineAccessibility extends TestCase } catch (com.sun.star.lang.WrappedTargetException e) { - e.printStackTrace(log); - throw new StatusException(Status.failed("Couldn't insert query")); + throw new StatusException(e, Status.failed("Couldn't insert query")); } catch (com.sun.star.container.ElementExistException e) { - e.printStackTrace(log); - throw new StatusException(Status.failed("Couldn't insert query")); + throw new StatusException(e, Status.failed("Couldn't insert query")); } catch (com.sun.star.lang.IllegalArgumentException e) { - e.printStackTrace(log); - throw new StatusException(Status.failed("Couldn't insert query")); + throw new StatusException(e, Status.failed("Couldn't insert query")); } catch (com.sun.star.io.IOException e) { - e.printStackTrace(log); - throw new StatusException(Status.failed("Couldn't insert query")); + throw new StatusException(e, Status.failed("Couldn't insert query")); } catch (com.sun.star.sdbc.SQLException e) { - e.printStackTrace(log); - throw new StatusException(Status.failed("Couldn't insert query")); + throw new StatusException(e, Status.failed("Couldn't insert query")); } PropertyValue[] loadProps = new PropertyValue[3]; diff --git a/qadevOOo/tests/java/mod/_dbaccess/JoinViewAccessibility.java b/qadevOOo/tests/java/mod/_dbaccess/JoinViewAccessibility.java index 2dbcd0bc672b..46a5551c68a1 100644 --- a/qadevOOo/tests/java/mod/_dbaccess/JoinViewAccessibility.java +++ b/qadevOOo/tests/java/mod/_dbaccess/JoinViewAccessibility.java @@ -113,8 +113,7 @@ public class JoinViewAccessibility extends TestCase { .createInstance ("com.sun.star.awt.Toolkit"); } catch (com.sun.star.uno.Exception e) { - e.printStackTrace (log); - throw new StatusException (Status.failed ("Couldn't create instance")); + throw new StatusException(e, Status.failed ("Couldn't create instance")); } String mysqlURL = (String) Param.get ("mysql.url"); @@ -151,24 +150,16 @@ public class JoinViewAccessibility extends TestCase { propSetDBSource.setPropertyValue ("Info", info); } catch (com.sun.star.lang.WrappedTargetException e) { - e.printStackTrace (log); - throw new StatusException (Status.failed ( - "Couldn't set property value")); + throw new StatusException(e, Status.failed("Couldn't set property value")); } catch (com.sun.star.lang.IllegalArgumentException e) { - e.printStackTrace (log); - throw new StatusException (Status.failed ( - "Couldn't set property value")); + throw new StatusException(e, Status.failed("Couldn't set property value")); } catch (com.sun.star.beans.PropertyVetoException e) { - e.printStackTrace (log); - throw new StatusException (Status.failed ( - "Couldn't set property value")); + throw new StatusException(e, Status.failed("Couldn't set property value")); } catch (com.sun.star.beans.UnknownPropertyException e) { - e.printStackTrace (log); - throw new StatusException (Status.failed ( - "Couldn't set property value")); + throw new StatusException(e, Status.failed("Couldn't set property value")); } try @@ -184,8 +175,7 @@ public class JoinViewAccessibility extends TestCase { 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 ( @@ -226,8 +216,7 @@ public class JoinViewAccessibility extends TestCase { col_name2 + " int)"); } catch (com.sun.star.sdbc.SQLException e2) { - e2.printStackTrace (log); - throw new StatusException (Status.failed ("SQLException")); + throw new StatusException(e, Status.failed ("SQLException")); } } @@ -249,24 +238,16 @@ public class JoinViewAccessibility extends TestCase { queryProp.setPropertyValue ("Command", query); } catch (com.sun.star.lang.WrappedTargetException e) { - e.printStackTrace (log); - throw new StatusException (Status.failed ( - "Couldn't set property value")); + throw new StatusException(e, Status.failed("Couldn't set property value")); } catch (com.sun.star.lang.IllegalArgumentException e) { - e.printStackTrace (log); - throw new StatusException (Status.failed ( - "Couldn't set property value")); + throw new StatusException(e, Status.failed("Couldn't set property value")); } catch (com.sun.star.beans.PropertyVetoException e) { - e.printStackTrace (log); - throw new StatusException (Status.failed ( - "Couldn't set property value")); + throw new StatusException(e, Status.failed("Couldn't set property value")); } catch (com.sun.star.beans.UnknownPropertyException e) { - e.printStackTrace (log); - throw new StatusException (Status.failed ( - "Couldn't set property value")); + throw new StatusException(e, Status.failed("Couldn't set property value")); } XNameContainer queryContainer = UnoRuntime.queryInterface ( @@ -280,24 +261,19 @@ public class JoinViewAccessibility extends TestCase { connection.close (); } catch (com.sun.star.lang.WrappedTargetException e) { - e.printStackTrace (log); - throw new StatusException (Status.failed ("Couldn't insert query")); + throw new StatusException(e, Status.failed ("Couldn't insert query")); } catch (com.sun.star.container.ElementExistException e) { - e.printStackTrace (log); - throw new StatusException (Status.failed ("Couldn't insert query")); + throw new StatusException(e, Status.failed ("Couldn't insert query")); } catch (com.sun.star.lang.IllegalArgumentException e) { - e.printStackTrace (log); - throw new StatusException (Status.failed ("Couldn't insert query")); + throw new StatusException(e, Status.failed ("Couldn't insert query")); } catch (com.sun.star.io.IOException e) { - e.printStackTrace (log); - throw new StatusException (Status.failed ("Couldn't insert query")); + throw new StatusException(e, Status.failed ("Couldn't insert query")); } catch (com.sun.star.sdbc.SQLException e) { - e.printStackTrace (log); - throw new StatusException (Status.failed ("Couldn't insert query")); + throw new StatusException(e, Status.failed ("Couldn't insert query")); } PropertyValue[] loadProps = new PropertyValue[3]; diff --git a/qadevOOo/tests/java/mod/_dbaccess/ORowSet.java b/qadevOOo/tests/java/mod/_dbaccess/ORowSet.java index be7877107b28..dbb72469ea0a 100644 --- a/qadevOOo/tests/java/mod/_dbaccess/ORowSet.java +++ b/qadevOOo/tests/java/mod/_dbaccess/ORowSet.java @@ -265,13 +265,12 @@ public class ORowSet extends TestCase { } catch(java.sql.SQLException e) { - e.printStackTrace(log); - throw new StatusException(Status.failed("Couldn't " + + throw new StatusException(e, Status.failed("Couldn't " + " init test table. SQLException...")); } catch(java.lang.ClassNotFoundException e) { - throw new StatusException(Status.failed("Couldn't " + + throw new StatusException(e, Status.failed("Couldn't " + "register mysql driver")); } } diff --git a/qadevOOo/tests/java/mod/_dbaccess/TableWindowAccessibility.java b/qadevOOo/tests/java/mod/_dbaccess/TableWindowAccessibility.java index 3a7b8b528d70..17839ab97c3b 100644 --- a/qadevOOo/tests/java/mod/_dbaccess/TableWindowAccessibility.java +++ b/qadevOOo/tests/java/mod/_dbaccess/TableWindowAccessibility.java @@ -112,8 +112,7 @@ public class TableWindowAccessibility extends TestCase { Param.getMSF() .createInstance("com.sun.star.awt.Toolkit"); } catch (com.sun.star.uno.Exception e) { - e.printStackTrace(log); - throw new StatusException(Status.failed("Couldn't create instance")); + throw new StatusException(e, Status.failed("Couldn't create instance")); } String mysqlURL = (String) Param.get("mysql.url"); @@ -146,21 +145,13 @@ public class TableWindowAccessibility extends TestCase { propSetDBSource.setPropertyValue("URL", mysqlURL); propSetDBSource.setPropertyValue("Info", info); } catch (com.sun.star.lang.WrappedTargetException e) { - e.printStackTrace(log); - throw new StatusException(Status.failed( - "Couldn't set property value")); + throw new StatusException(e, Status.failed("Couldn't set property value")); } catch (com.sun.star.lang.IllegalArgumentException e) { - e.printStackTrace(log); - throw new StatusException(Status.failed( - "Couldn't set property value")); + throw new StatusException(e, Status.failed("Couldn't set property value")); } catch (com.sun.star.beans.PropertyVetoException e) { - e.printStackTrace(log); - throw new StatusException(Status.failed( - "Couldn't set property value")); + throw new StatusException(e, Status.failed("Couldn't set property value")); } catch (com.sun.star.beans.UnknownPropertyException e) { - e.printStackTrace(log); - throw new StatusException(Status.failed( - "Couldn't set property value")); + throw new StatusException(e, Status.failed("Couldn't set property value")); } try { @@ -211,8 +202,7 @@ public class TableWindowAccessibility extends TestCase { statement.executeUpdate("create table " + tbl_name2 + " (" + col_name2 + " int)"); } catch (com.sun.star.sdbc.SQLException e2) { - e2.printStackTrace(log); - throw new StatusException(Status.failed("SQLException")); + throw new StatusException(e2, Status.failed("SQLException")); } } @@ -232,21 +222,13 @@ public class TableWindowAccessibility extends TestCase { col_name2; queryProp.setPropertyValue("Command", query); } catch (com.sun.star.lang.WrappedTargetException e) { - e.printStackTrace(log); - throw new StatusException(Status.failed( - "Couldn't set property value")); + throw new StatusException(e, Status.failed("Couldn't set property value")); } catch (com.sun.star.lang.IllegalArgumentException e) { - e.printStackTrace(log); - throw new StatusException(Status.failed( - "Couldn't set property value")); + throw new StatusException(e, Status.failed("Couldn't set property value")); } catch (com.sun.star.beans.PropertyVetoException e) { - e.printStackTrace(log); - throw new StatusException(Status.failed( - "Couldn't set property value")); + throw new StatusException(e, Status.failed("Couldn't set property value")); } catch (com.sun.star.beans.UnknownPropertyException e) { - e.printStackTrace(log); - throw new StatusException(Status.failed( - "Couldn't set property value")); + throw new StatusException(e, Status.failed("Couldn't set property value")); } XNameContainer queryContainer = UnoRuntime.queryInterface( @@ -258,20 +240,15 @@ public class TableWindowAccessibility extends TestCase { store.store(); connection.close (); } catch (com.sun.star.lang.WrappedTargetException e) { - e.printStackTrace(log); - throw new StatusException(Status.failed("Couldn't insert query")); + throw new StatusException(e, Status.failed("Couldn't insert query")); } catch (com.sun.star.container.ElementExistException e) { - e.printStackTrace(log); - throw new StatusException(Status.failed("Couldn't insert query")); + throw new StatusException(e, Status.failed("Couldn't insert query")); } catch (com.sun.star.lang.IllegalArgumentException e) { - e.printStackTrace(log); - throw new StatusException(Status.failed("Couldn't insert query")); + throw new StatusException(e, Status.failed("Couldn't insert query")); } catch (com.sun.star.io.IOException e) { - e.printStackTrace(log); - throw new StatusException(Status.failed("Couldn't insert query")); + throw new StatusException(e, Status.failed("Couldn't insert query")); } catch (com.sun.star.sdbc.SQLException e) { - e.printStackTrace(log); - throw new StatusException(Status.failed("Couldn't insert query")); + throw new StatusException(e, Status.failed("Couldn't insert query")); } PropertyValue[] loadProps = new PropertyValue[3]; diff --git a/qadevOOo/tests/java/mod/_dbpool/OConnectionPool.java b/qadevOOo/tests/java/mod/_dbpool/OConnectionPool.java index 4eac4ab86735..468d97966523 100644 --- a/qadevOOo/tests/java/mod/_dbpool/OConnectionPool.java +++ b/qadevOOo/tests/java/mod/_dbpool/OConnectionPool.java @@ -52,8 +52,7 @@ public class OConnectionPool extends TestCase { oObj = (XInterface) xMSF.createInstance("com.sun.star.sdbc.ConnectionPool"); } catch(com.sun.star.uno.Exception e) { - throw new StatusException( - Status.failed("Couldn't create instance")); + throw new StatusException(e, Status.failed("Couldn't create instance")); } log.println("creating a new environment for object"); diff --git a/qadevOOo/tests/java/mod/_file/calc/ODriver.java b/qadevOOo/tests/java/mod/_file/calc/ODriver.java index 4e17d9a448e8..a73a0a3e0333 100644 --- a/qadevOOo/tests/java/mod/_file/calc/ODriver.java +++ b/qadevOOo/tests/java/mod/_file/calc/ODriver.java @@ -70,8 +70,7 @@ public class ODriver extends TestCase { oObj = (XInterface)Param.getMSF().createInstance( "com.sun.star.comp.sdbc.calc.ODriver"); } catch (com.sun.star.uno.Exception e) { - e.printStackTrace(log); - throw new StatusException(Status.failed("Couldn't create object")); + throw new StatusException(e, Status.failed("Couldn't create object")); } log.println("creating a new environment for calc.ODriver object"); diff --git a/qadevOOo/tests/java/mod/_file/dbase/ODriver.java b/qadevOOo/tests/java/mod/_file/dbase/ODriver.java index 70ffcd27094f..e8dd2d466933 100644 --- a/qadevOOo/tests/java/mod/_file/dbase/ODriver.java +++ b/qadevOOo/tests/java/mod/_file/dbase/ODriver.java @@ -69,8 +69,7 @@ public class ODriver extends TestCase { oObj = (XInterface)Param.getMSF().createInstance( "com.sun.star.comp.sdbc.dbase.ODriver"); } catch (com.sun.star.uno.Exception e) { - e.printStackTrace(log); - throw new StatusException(Status.failed("Couldn't create object")); + throw new StatusException(e, Status.failed("Couldn't create object")); } log.println("creating a new environment for dbase.ODriver object"); diff --git a/qadevOOo/tests/java/mod/_file/flat/ODriver.java b/qadevOOo/tests/java/mod/_file/flat/ODriver.java index 849de8497ea0..5287ea31fbd6 100644 --- a/qadevOOo/tests/java/mod/_file/flat/ODriver.java +++ b/qadevOOo/tests/java/mod/_file/flat/ODriver.java @@ -67,8 +67,7 @@ public class ODriver extends TestCase { oObj = (XInterface)Param.getMSF().createInstance( "com.sun.star.comp.sdbc.flat.ODriver"); } catch (com.sun.star.uno.Exception e) { - e.printStackTrace(log); - throw new StatusException(Status.failed("Couldn't create object")); + throw new StatusException(e, Status.failed("Couldn't create object")); } log.println("creating a new environment for flat.ODriver object"); 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); diff --git a/qadevOOo/tests/java/mod/_fwk/Desktop.java b/qadevOOo/tests/java/mod/_fwk/Desktop.java index f97d440b1588..35fd5183d6e7 100644 --- a/qadevOOo/tests/java/mod/_fwk/Desktop.java +++ b/qadevOOo/tests/java/mod/_fwk/Desktop.java @@ -100,9 +100,7 @@ public class Desktop extends TestCase { log.println( "creating a text document" ); xTextDoc = SOF.createTextDoc(null); } catch ( com.sun.star.uno.Exception e ) { - // Some exception occurs.FAILED - e.printStackTrace( log ); - throw new StatusException( "Couldn't create document", e ); + throw new StatusException("Couldn't create document", e); } XInterface oObj = null; @@ -111,9 +109,7 @@ public class Desktop extends TestCase { oObj = (XInterface)Param.getMSF().createInstance( "com.sun.star.comp.framework.Desktop"); } catch(com.sun.star.uno.Exception e) { - e.printStackTrace(log); - throw new StatusException( - Status.failed("Couldn't create instance")); + throw new StatusException(e, Status.failed("Couldn't create instance")); } TestEnvironment tEnv = new TestEnvironment( oObj ); diff --git a/qadevOOo/tests/java/mod/_fwk/DispatchRecorderSupplier.java b/qadevOOo/tests/java/mod/_fwk/DispatchRecorderSupplier.java index 07df37d050cb..40fe1540eaec 100644 --- a/qadevOOo/tests/java/mod/_fwk/DispatchRecorderSupplier.java +++ b/qadevOOo/tests/java/mod/_fwk/DispatchRecorderSupplier.java @@ -53,9 +53,7 @@ public class DispatchRecorderSupplier extends TestCase { oObj = (XInterface)Param.getMSF().createInstance( "com.sun.star.comp.framework.DispatchRecorderSupplier"); } catch(com.sun.star.uno.Exception e) { - e.printStackTrace(log); - throw new StatusException( - Status.failed("Couldn't create instance")); + throw new StatusException(e, Status.failed("Couldn't create instance")); } TestEnvironment tEnv = new TestEnvironment( oObj ); diff --git a/qadevOOo/tests/java/mod/_fwk/JobExecutor.java b/qadevOOo/tests/java/mod/_fwk/JobExecutor.java index f33c31fffa9b..8cf372db98c2 100644 --- a/qadevOOo/tests/java/mod/_fwk/JobExecutor.java +++ b/qadevOOo/tests/java/mod/_fwk/JobExecutor.java @@ -209,9 +209,7 @@ public class JobExecutor extends TestCase { "com.sun.star.comp.framework.JobExecutor"); job = Param.getMSF().createInstance("test.Job"); } catch(com.sun.star.uno.Exception e) { - e.printStackTrace(log); - throw new StatusException( - Status.failed("Couldn't create instance")); + throw new StatusException(e, Status.failed("Couldn't create instance")); } xNamed = UnoRuntime.queryInterface(XNamed.class, job); diff --git a/qadevOOo/tests/java/mod/_fwk/JobHandler.java b/qadevOOo/tests/java/mod/_fwk/JobHandler.java index d17958fd4877..61f6c9e6a102 100644 --- a/qadevOOo/tests/java/mod/_fwk/JobHandler.java +++ b/qadevOOo/tests/java/mod/_fwk/JobHandler.java @@ -68,9 +68,7 @@ public class JobHandler extends TestCase { oObj = (XInterface)Param.getMSF().createInstance( "com.sun.star.comp.framework.jobs.JobDispatch"); } catch(com.sun.star.uno.Exception e) { - e.printStackTrace(log); - throw new StatusException( - Status.failed("Couldn't create instance")); + throw new StatusException(e, Status.failed("Couldn't create instance")); } TestEnvironment tEnv = new TestEnvironment( oObj ); diff --git a/qadevOOo/tests/java/mod/_fwk/MailToDispatcher.java b/qadevOOo/tests/java/mod/_fwk/MailToDispatcher.java index 9b5546406e99..98f817d118a9 100644 --- a/qadevOOo/tests/java/mod/_fwk/MailToDispatcher.java +++ b/qadevOOo/tests/java/mod/_fwk/MailToDispatcher.java @@ -55,9 +55,7 @@ public class MailToDispatcher extends TestCase { oObj = (XInterface)Param.getMSF().createInstance( "com.sun.star.comp.framework.MailToDispatcher"); } catch(com.sun.star.uno.Exception e) { - e.printStackTrace(log); - throw new StatusException( - Status.failed("Couldn't create instance")); + throw new StatusException(e, Status.failed("Couldn't create instance")); } TestEnvironment tEnv = new TestEnvironment( oObj ); diff --git a/qadevOOo/tests/java/mod/_fwk/ModuleManager.java b/qadevOOo/tests/java/mod/_fwk/ModuleManager.java index c88e549d3a17..014379d2239f 100644 --- a/qadevOOo/tests/java/mod/_fwk/ModuleManager.java +++ b/qadevOOo/tests/java/mod/_fwk/ModuleManager.java @@ -74,9 +74,7 @@ public class ModuleManager extends TestCase { oObj = (XInterface)Param.getMSF().createInstance( "com.sun.star.comp.framework.ModuleManager"); } catch(Exception e) { - e.printStackTrace(log); - throw new StatusException( - Status.failed("Couldn't create instance")); + throw new StatusException(e, Status.failed("Couldn't create instance")); } // get a soffice factory object SOfficeFactory SOF = SOfficeFactory.getFactory( diff --git a/qadevOOo/tests/java/mod/_fwk/ServiceHandler.java b/qadevOOo/tests/java/mod/_fwk/ServiceHandler.java index 0bf0512562e3..44aa29a1ecd4 100644 --- a/qadevOOo/tests/java/mod/_fwk/ServiceHandler.java +++ b/qadevOOo/tests/java/mod/_fwk/ServiceHandler.java @@ -55,9 +55,7 @@ public class ServiceHandler extends TestCase { oObj = (XInterface)Param.getMSF().createInstance( "com.sun.star.comp.framework.ServiceHandler"); } catch(com.sun.star.uno.Exception e) { - e.printStackTrace(log); - throw new StatusException( - Status.failed("Couldn't create instance")); + throw new StatusException(e, Status.failed("Couldn't create instance")); } TestEnvironment tEnv = new TestEnvironment( oObj ); diff --git a/qadevOOo/tests/java/mod/_fwk/SoundHandler.java b/qadevOOo/tests/java/mod/_fwk/SoundHandler.java index d0c550ad6929..d563645e2762 100644 --- a/qadevOOo/tests/java/mod/_fwk/SoundHandler.java +++ b/qadevOOo/tests/java/mod/_fwk/SoundHandler.java @@ -55,9 +55,7 @@ public class SoundHandler extends TestCase { oObj = (XInterface)Param.getMSF().createInstance( "com.sun.star.frame.ContentHandler"); } catch(com.sun.star.uno.Exception e) { - e.printStackTrace(log); - throw new StatusException( - Status.failed("Couldn't create instance")); + throw new StatusException(e, Status.failed("Couldn't create instance")); } TestEnvironment tEnv = new TestEnvironment( oObj ); diff --git a/qadevOOo/tests/java/mod/_fwk/URLTransformer.java b/qadevOOo/tests/java/mod/_fwk/URLTransformer.java index 6a304687699a..b8d9d512f7c3 100644 --- a/qadevOOo/tests/java/mod/_fwk/URLTransformer.java +++ b/qadevOOo/tests/java/mod/_fwk/URLTransformer.java @@ -51,9 +51,7 @@ public class URLTransformer extends TestCase { oObj = (XInterface)Param.getMSF().createInstance( "com.sun.star.comp.framework.URLTransformer"); } catch(com.sun.star.uno.Exception e) { - e.printStackTrace(log); - throw new StatusException( - Status.failed("Couldn't create instance")); + throw new StatusException(e, Status.failed("Couldn't create instance")); } TestEnvironment tEnv = new TestEnvironment( oObj ); diff --git a/qadevOOo/tests/java/mod/_fwl/FilterFactory.java b/qadevOOo/tests/java/mod/_fwl/FilterFactory.java index 9fc1bd8275b5..b2eff4cf14d4 100644 --- a/qadevOOo/tests/java/mod/_fwl/FilterFactory.java +++ b/qadevOOo/tests/java/mod/_fwl/FilterFactory.java @@ -103,11 +103,9 @@ public class FilterFactory extends TestCase { getPropertyValue (((PropertyValue[]) instance), "FilterService"); } catch (com.sun.star.container.NoSuchElementException e){ - throw new StatusException( - Status.failed("Couldn't get elements from object")); + throw new StatusException(e, Status.failed("Couldn't get elements from object")); } catch (com.sun.star.lang.WrappedTargetException e){ - throw new StatusException( - Status.failed("Couldn't get elements from object")); + throw new StatusException(e, Status.failed("Couldn't get elements from object")); } log.println("adding INSTANCE 1 as obj relation to environment"); diff --git a/qadevOOo/tests/java/mod/_fwl/TypeDetection.java b/qadevOOo/tests/java/mod/_fwl/TypeDetection.java index dfa8f98175fc..f64f20b9a534 100644 --- a/qadevOOo/tests/java/mod/_fwl/TypeDetection.java +++ b/qadevOOo/tests/java/mod/_fwl/TypeDetection.java @@ -119,11 +119,9 @@ public class TypeDetection extends TestCase { try{ instance = (Object[]) xNA.getByName(elementName); } catch (com.sun.star.container.NoSuchElementException e){ - throw new StatusException( - Status.failed("Couldn't get elements from object")); + throw new StatusException(e, Status.failed("Couldn't get elements from object")); } catch (com.sun.star.lang.WrappedTargetException e){ - throw new StatusException( - Status.failed("Couldn't get elements from object")); + throw new StatusException(e, Status.failed("Couldn't get elements from object")); } log.println("adding INSTANCE 1 as obj relation to environment"); diff --git a/qadevOOo/tests/java/mod/_jdbc/JDBCDriver.java b/qadevOOo/tests/java/mod/_jdbc/JDBCDriver.java index e5c215d268ab..291ceb00d51b 100644 --- a/qadevOOo/tests/java/mod/_jdbc/JDBCDriver.java +++ b/qadevOOo/tests/java/mod/_jdbc/JDBCDriver.java @@ -65,8 +65,7 @@ public class JDBCDriver extends TestCase { oObj = (XInterface)Param.getMSF().createInstance( "com.sun.star.comp.sdbc.JDBCDriver"); } catch (com.sun.star.uno.Exception e) { - e.printStackTrace(log); - throw new StatusException(Status.failed("Couldn't create object")); + throw new StatusException(e, Status.failed("Couldn't create object")); } log.println("creating a new environment for JDBCDriver object"); diff --git a/qadevOOo/tests/java/mod/_mozab/MozabDriver.java b/qadevOOo/tests/java/mod/_mozab/MozabDriver.java index f52895372116..aa316979136f 100644 --- a/qadevOOo/tests/java/mod/_mozab/MozabDriver.java +++ b/qadevOOo/tests/java/mod/_mozab/MozabDriver.java @@ -66,7 +66,7 @@ public class MozabDriver extends TestCase { oObj = (XInterface)Param.getMSF(). createInstance("com.sun.star.comp.sdbc.MozabDriver"); } catch (com.sun.star.uno.Exception e) { - throw new StatusException(Status.failed("Couldn't create object")); + throw new StatusException(e, Status.failed("Couldn't create object")); } log.println("creating a new environment for object"); diff --git a/qadevOOo/tests/java/mod/_odbc/ODBCDriver.java b/qadevOOo/tests/java/mod/_odbc/ODBCDriver.java index 5ba1eaa97a69..6e6cd83039f4 100644 --- a/qadevOOo/tests/java/mod/_odbc/ODBCDriver.java +++ b/qadevOOo/tests/java/mod/_odbc/ODBCDriver.java @@ -62,8 +62,7 @@ public class ODBCDriver extends TestCase { oObj = (XInterface)Param.getMSF().createInstance( "com.sun.star.comp.sdbc.ODBCDriver"); } catch (com.sun.star.uno.Exception e) { - e.printStackTrace(log); - throw new StatusException(Status.failed("Couldn't create object")); + throw new StatusException(e, Status.failed("Couldn't create object")); } log.println("creating a new environment for ODBCDriver object"); diff --git a/qadevOOo/tests/java/mod/_sc/AccessibleEditableTextPara_PreviewCell.java b/qadevOOo/tests/java/mod/_sc/AccessibleEditableTextPara_PreviewCell.java index e0f9a2e8581b..360970b88a75 100644 --- a/qadevOOo/tests/java/mod/_sc/AccessibleEditableTextPara_PreviewCell.java +++ b/qadevOOo/tests/java/mod/_sc/AccessibleEditableTextPara_PreviewCell.java @@ -134,7 +134,7 @@ public class AccessibleEditableTextPara_PreviewCell extends TestCase { xDispatcher.dispatch( aURL, null ); } catch (com.sun.star.uno.Exception e) { log.println("Couldn't change mode"); - throw new StatusException(Status.failed("Couldn't change mode")); + throw new StatusException(e, Status.failed("Couldn't change mode")); } XAccessibleContext oObj = null; diff --git a/qadevOOo/tests/java/mod/_sc/ScAccessibleDocumentPagePreview.java b/qadevOOo/tests/java/mod/_sc/ScAccessibleDocumentPagePreview.java index 8e1e05ac40f7..fb6995dbc028 100644 --- a/qadevOOo/tests/java/mod/_sc/ScAccessibleDocumentPagePreview.java +++ b/qadevOOo/tests/java/mod/_sc/ScAccessibleDocumentPagePreview.java @@ -146,8 +146,7 @@ public class ScAccessibleDocumentPagePreview extends TestCase { if(xDispatcher != null) xDispatcher.dispatch( aURL, null ); } catch (com.sun.star.uno.Exception e) { - log.println("Couldn't change mode"); - throw new StatusException(Status.failed("Couldn't change mode")); + throw new StatusException(e, Status.failed("Couldn't change mode")); } try { diff --git a/qadevOOo/tests/java/mod/_sc/ScAccessiblePageHeader.java b/qadevOOo/tests/java/mod/_sc/ScAccessiblePageHeader.java index 552c7c0536d7..318e29dfe99b 100644 --- a/qadevOOo/tests/java/mod/_sc/ScAccessiblePageHeader.java +++ b/qadevOOo/tests/java/mod/_sc/ScAccessiblePageHeader.java @@ -132,8 +132,7 @@ public class ScAccessiblePageHeader extends TestCase { if(xDispatcher != null) xDispatcher.dispatch( aURL, null ); } catch (com.sun.star.uno.Exception e) { - log.println("Couldn't change mode"); - throw new StatusException(Status.failed("Couldn't change mode")); + throw new StatusException(e, Status.failed("Couldn't change mode")); } XInterface oObj = null; diff --git a/qadevOOo/tests/java/mod/_sc/ScAccessiblePageHeaderArea.java b/qadevOOo/tests/java/mod/_sc/ScAccessiblePageHeaderArea.java index e05f4da4f220..f63df1bbf2db 100644 --- a/qadevOOo/tests/java/mod/_sc/ScAccessiblePageHeaderArea.java +++ b/qadevOOo/tests/java/mod/_sc/ScAccessiblePageHeaderArea.java @@ -128,8 +128,7 @@ public class ScAccessiblePageHeaderArea extends TestCase { if(xDispatcher != null) xDispatcher.dispatch( aURL, null ); } catch (com.sun.star.uno.Exception e) { - log.println("Couldn't change mode"); - throw new StatusException(Status.failed("Couldn't change mode")); + throw new StatusException(e, Status.failed("Couldn't change mode")); } try { diff --git a/qadevOOo/tests/java/mod/_sc/ScAccessiblePreviewCell.java b/qadevOOo/tests/java/mod/_sc/ScAccessiblePreviewCell.java index bb6c5e2e5450..b67fbf657ab5 100644 --- a/qadevOOo/tests/java/mod/_sc/ScAccessiblePreviewCell.java +++ b/qadevOOo/tests/java/mod/_sc/ScAccessiblePreviewCell.java @@ -156,8 +156,7 @@ public class ScAccessiblePreviewCell extends TestCase { if(xDispatcher != null) xDispatcher.dispatch( aURL, null ); } catch (com.sun.star.uno.Exception e) { - log.println("Couldn't change mode"); - throw new StatusException(Status.failed("Couldn't change mode")); + throw new StatusException(e, Status.failed("Couldn't change mode")); } XInterface oObj = null; diff --git a/qadevOOo/tests/java/mod/_sc/ScAccessiblePreviewHeaderCell.java b/qadevOOo/tests/java/mod/_sc/ScAccessiblePreviewHeaderCell.java index 4f83e467aad9..388249d8c7d4 100644 --- a/qadevOOo/tests/java/mod/_sc/ScAccessiblePreviewHeaderCell.java +++ b/qadevOOo/tests/java/mod/_sc/ScAccessiblePreviewHeaderCell.java @@ -189,30 +189,24 @@ public class ScAccessiblePreviewHeaderCell extends TestCase { xPropSet = UnoRuntime.queryInterface( XPropertySet.class, oDefStyle); } catch (com.sun.star.lang.WrappedTargetException e) { - e.printStackTrace(log); - throw new StatusException(Status.failed("Couldn't get element")); + throw new StatusException(e, Status.failed("Couldn't get element")); } catch (com.sun.star.container.NoSuchElementException e) { - e.printStackTrace(log); - throw new StatusException(Status.failed("Couldn't get element")); + throw new StatusException(e, Status.failed("Couldn't get element")); } try { xPropSet.setPropertyValue("PrintHeaders", Boolean.TRUE); } catch (com.sun.star.lang.WrappedTargetException e) { - e.printStackTrace(log); - throw new StatusException(Status.failed( + throw new StatusException(e, Status.failed( "Couldn't set property 'PrintHeaders'")); } catch (com.sun.star.lang.IllegalArgumentException e) { - e.printStackTrace(log); - throw new StatusException(Status.failed( + throw new StatusException(e, Status.failed( "Couldn't set property 'PrintHeaders'")); } catch (com.sun.star.beans.PropertyVetoException e) { - e.printStackTrace(log); - throw new StatusException(Status.failed( + throw new StatusException(e, Status.failed( "Couldn't set property 'PrintHeaders'")); } catch (com.sun.star.beans.UnknownPropertyException e) { - e.printStackTrace(log); - throw new StatusException(Status.failed( + throw new StatusException(e, Status.failed( "Couldn't set property 'PrintHeaders'")); } @@ -237,8 +231,7 @@ public class ScAccessiblePreviewHeaderCell extends TestCase { xDispatcher.dispatch(aURL, null); } } catch (com.sun.star.uno.Exception e) { - log.println("Couldn't change mode"); - throw new StatusException(Status.failed("Couldn't change mode")); + throw new StatusException(e, Status.failed("Couldn't change mode")); } XInterface oObj = null; diff --git a/qadevOOo/tests/java/mod/_sc/ScAccessiblePreviewTable.java b/qadevOOo/tests/java/mod/_sc/ScAccessiblePreviewTable.java index 7f5ecd269f84..f2e963f36722 100644 --- a/qadevOOo/tests/java/mod/_sc/ScAccessiblePreviewTable.java +++ b/qadevOOo/tests/java/mod/_sc/ScAccessiblePreviewTable.java @@ -159,8 +159,7 @@ public class ScAccessiblePreviewTable extends TestCase { if(xDispatcher != null) xDispatcher.dispatch( aURL, null ); } catch (com.sun.star.uno.Exception e) { - log.println("Couldn't change mode"); - throw new StatusException(Status.failed("Couldn't change mode")); + throw new StatusException(e, Status.failed("Couldn't change mode")); } XAccessible xRoot; diff --git a/qadevOOo/tests/java/mod/_sd/DrawController_DrawView.java b/qadevOOo/tests/java/mod/_sd/DrawController_DrawView.java index 9aed41fc284b..ed00ca1445cd 100644 --- a/qadevOOo/tests/java/mod/_sd/DrawController_DrawView.java +++ b/qadevOOo/tests/java/mod/_sd/DrawController_DrawView.java @@ -207,8 +207,7 @@ public class DrawController_DrawView extends TestCase { oShapeCol2 = Param.getMSF(). createInstance("com.sun.star.drawing.ShapeCollection"); } catch(com.sun.star.uno.Exception e) { - e.printStackTrace(log); - throw new StatusException(Status.failed("Couldn't create instance")); + throw new StatusException(e, Status.failed("Couldn't create instance")); } XShapes xShapes1 = UnoRuntime.queryInterface(XShapes.class, oShapeCol1); diff --git a/qadevOOo/tests/java/mod/_sd/DrawController_HandoutView.java b/qadevOOo/tests/java/mod/_sd/DrawController_HandoutView.java index 1703c95d4a5d..9c7462098a9d 100644 --- a/qadevOOo/tests/java/mod/_sd/DrawController_HandoutView.java +++ b/qadevOOo/tests/java/mod/_sd/DrawController_HandoutView.java @@ -240,8 +240,7 @@ public class DrawController_HandoutView extends TestCase { oShapeCol2 = xMSF. createInstance("com.sun.star.drawing.ShapeCollection"); } catch(com.sun.star.uno.Exception e) { - e.printStackTrace(log); - throw new StatusException(Status.failed("Couldn't create instance")); + throw new StatusException(e, Status.failed("Couldn't create instance")); } XShapes xShapes1 = UnoRuntime.queryInterface(XShapes.class, oShapeCol1); diff --git a/qadevOOo/tests/java/mod/_sd/DrawController_NotesView.java b/qadevOOo/tests/java/mod/_sd/DrawController_NotesView.java index 65a641d1ddba..a16b052ea4ae 100644 --- a/qadevOOo/tests/java/mod/_sd/DrawController_NotesView.java +++ b/qadevOOo/tests/java/mod/_sd/DrawController_NotesView.java @@ -237,8 +237,7 @@ public class DrawController_NotesView extends TestCase { oShapeCol2 = xMSF. createInstance("com.sun.star.drawing.ShapeCollection"); } catch(com.sun.star.uno.Exception e) { - e.printStackTrace(log); - throw new StatusException(Status.failed("Couldn't create instance")); + throw new StatusException(e, Status.failed("Couldn't create instance")); } XShapes xShapes1 = UnoRuntime.queryInterface(XShapes.class, oShapeCol1); diff --git a/qadevOOo/tests/java/mod/_sd/DrawController_OutlineView.java b/qadevOOo/tests/java/mod/_sd/DrawController_OutlineView.java index afb690acd572..8a6d21e72a14 100644 --- a/qadevOOo/tests/java/mod/_sd/DrawController_OutlineView.java +++ b/qadevOOo/tests/java/mod/_sd/DrawController_OutlineView.java @@ -237,8 +237,7 @@ public class DrawController_OutlineView extends TestCase { oShapeCol2 = xMSF. createInstance("com.sun.star.drawing.ShapeCollection"); } catch(com.sun.star.uno.Exception e) { - e.printStackTrace(log); - throw new StatusException(Status.failed("Couldn't create instance")); + throw new StatusException(e, Status.failed("Couldn't create instance")); } XShapes xShapes1 = UnoRuntime.queryInterface(XShapes.class, oShapeCol1); diff --git a/qadevOOo/tests/java/mod/_sd/DrawController_PresentationView.java b/qadevOOo/tests/java/mod/_sd/DrawController_PresentationView.java index 5163c4f576a4..cd59131d9670 100644 --- a/qadevOOo/tests/java/mod/_sd/DrawController_PresentationView.java +++ b/qadevOOo/tests/java/mod/_sd/DrawController_PresentationView.java @@ -237,8 +237,7 @@ public class DrawController_PresentationView extends TestCase { oShapeCol2 = xMSF. createInstance("com.sun.star.drawing.ShapeCollection"); } catch(com.sun.star.uno.Exception e) { - e.printStackTrace(log); - throw new StatusException(Status.failed("Couldn't create instance")); + throw new StatusException(e, Status.failed("Couldn't create instance")); } XShapes xShapes1 = UnoRuntime.queryInterface(XShapes.class, oShapeCol1); diff --git a/qadevOOo/tests/java/mod/_sw/SwAccessibleDocumentPageView.java b/qadevOOo/tests/java/mod/_sw/SwAccessibleDocumentPageView.java index 854cb2f218a8..9fcd67c144e4 100644 --- a/qadevOOo/tests/java/mod/_sw/SwAccessibleDocumentPageView.java +++ b/qadevOOo/tests/java/mod/_sw/SwAccessibleDocumentPageView.java @@ -110,8 +110,7 @@ public class SwAccessibleDocumentPageView extends TestCase { if(xDispatcher != null) xDispatcher.dispatch( aURL, null ); } catch (com.sun.star.uno.Exception e) { - log.println("Couldn't change mode"); - throw new StatusException(Status.failed("Couldn't change mode")); + throw new StatusException(e, Status.failed("Couldn't change mode")); } shortWait(); diff --git a/qadevOOo/tests/java/mod/_sw/SwAccessiblePageView.java b/qadevOOo/tests/java/mod/_sw/SwAccessiblePageView.java index 77e5d7181c75..9137f9dfc49a 100644 --- a/qadevOOo/tests/java/mod/_sw/SwAccessiblePageView.java +++ b/qadevOOo/tests/java/mod/_sw/SwAccessiblePageView.java @@ -165,8 +165,7 @@ public class SwAccessiblePageView extends TestCase { if(xDispatcher != null) xDispatcher.dispatch( aURL, null ); } catch (com.sun.star.uno.Exception e) { - log.println("Couldn't change mode"); - throw new StatusException(Status.failed("Couldn't change mode")); + throw new StatusException(e, Status.failed("Couldn't change mode")); } shortWait(); diff --git a/qadevOOo/tests/java/mod/_toolkit/MutableTreeNode.java b/qadevOOo/tests/java/mod/_toolkit/MutableTreeNode.java index ea0d8b1368b4..7b469901f8f7 100644 --- a/qadevOOo/tests/java/mod/_toolkit/MutableTreeNode.java +++ b/qadevOOo/tests/java/mod/_toolkit/MutableTreeNode.java @@ -70,7 +70,7 @@ public class MutableTreeNode extends TestCase { mXTreeDataModel = UnoRuntime.queryInterface(XMutableTreeDataModel.class, mxMSF.createInstance("com.sun.star.awt.tree.MutableTreeDataModel")); } catch (com.sun.star.uno.Exception ex) { - throw new StatusException(Status.failed("ERROR: could not create instance of" + + throw new StatusException(ex, Status.failed("ERROR: could not create instance of" + " 'com.sun.star.awt.tree.MutableTreeDataModel'")); } |