diff options
Diffstat (limited to 'connectivity')
4 files changed, 10 insertions, 7 deletions
diff --git a/connectivity/com/sun/star/sdbcx/comp/hsqldb/NativeStorageAccess.java b/connectivity/com/sun/star/sdbcx/comp/hsqldb/NativeStorageAccess.java index 679d41e1b469..1ea9cd241d63 100644 --- a/connectivity/com/sun/star/sdbcx/comp/hsqldb/NativeStorageAccess.java +++ b/connectivity/com/sun/star/sdbcx/comp/hsqldb/NativeStorageAccess.java @@ -41,8 +41,10 @@ public class NativeStorageAccess { mode = NativeStorageAccess.READWRITE | NativeStorageAccess.SEEKABLE; openStream(name, (String)key, mode); - } catch(Exception e){ - throw new java.io.IOException(); + } catch(Exception ex1){ + java.io.IOException ex2 = new java.io.IOException(); + ex2.initCause(ex1); + throw ex2; } } private native void openStream(String name,String key, int mode); diff --git a/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageAccess.java b/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageAccess.java index 20a341201ca3..eefb37124d5c 100644 --- a/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageAccess.java +++ b/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageAccess.java @@ -32,8 +32,10 @@ public class StorageAccess implements org.hsqldb.lib.Storage { access = new NativeStorageAccess(name, this.readonly ? "r" : "rw" ,key); - } catch(Exception e){ - throw new java.io.IOException(); + } catch(Exception ex1){ + java.io.IOException ex2 = new java.io.IOException(); + ex2.initCause(ex1); + throw ex2; } } public void close() throws java.io.IOException{ diff --git a/connectivity/qa/complex/connectivity/HsqlDriverTest.java b/connectivity/qa/complex/connectivity/HsqlDriverTest.java index 5a399a2de362..747b2ac870b8 100644 --- a/connectivity/qa/complex/connectivity/HsqlDriverTest.java +++ b/connectivity/qa/complex/connectivity/HsqlDriverTest.java @@ -59,7 +59,7 @@ public class HsqlDriverTest extends ComplexTestCase { HsqlDatabase database = new HsqlDatabase( param.getMSF() ); ds = database.getDataSource().getXDataSource(); } catch(Exception ex) { - throw new RuntimeException("factory: unable to construct data source" ); + throw new RuntimeException("factory: unable to construct data source", ex ); } try{ diff --git a/connectivity/qa/connectivity/tools/RowSet.java b/connectivity/qa/connectivity/tools/RowSet.java index e5b2545c2c53..5897fce5f0d8 100644 --- a/connectivity/qa/connectivity/tools/RowSet.java +++ b/connectivity/qa/connectivity/tools/RowSet.java @@ -58,8 +58,7 @@ public class RowSet implements XRowSet, XRow } catch ( Exception e ) { - e.printStackTrace(System.err); - throw new java.lang.InstantiationError(); + throw new java.lang.RuntimeException(e); } } |