summaryrefslogtreecommitdiff
path: root/qadevOOo/tests/java/mod/_dbaccess
diff options
context:
space:
mode:
Diffstat (limited to 'qadevOOo/tests/java/mod/_dbaccess')
-rw-r--r--qadevOOo/tests/java/mod/_dbaccess/ConnectionLineAccessibility.java48
-rw-r--r--qadevOOo/tests/java/mod/_dbaccess/JoinViewAccessibility.java56
-rw-r--r--qadevOOo/tests/java/mod/_dbaccess/ORowSet.java5
-rw-r--r--qadevOOo/tests/java/mod/_dbaccess/TableWindowAccessibility.java53
4 files changed, 49 insertions, 113 deletions
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];