summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2015-05-30 14:27:24 +0200
committerLionel Elie Mamane <lionel@mamane.lu>2015-05-30 17:32:49 +0200
commit99c6e8dc1fdabcc5af24a7a3cc8ff510140b0c94 (patch)
tree4f659397634949463ee23869480c00f5c86a765f /connectivity
parent8607f8b552d917f064b2ebfd60ffcef1e6f92bb0 (diff)
HSQLDB connection flush: safer handling when createStatement or execute fails
Change-Id: I32f3014bbf32c4a4a990bea03ee565c9b4c0164d
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/hsqldb/HConnection.cxx13
1 files changed, 10 insertions, 3 deletions
diff --git a/connectivity/source/drivers/hsqldb/HConnection.cxx b/connectivity/source/drivers/hsqldb/HConnection.cxx
index 562fc493b579..16b537843d44 100644
--- a/connectivity/source/drivers/hsqldb/HConnection.cxx
+++ b/connectivity/source/drivers/hsqldb/HConnection.cxx
@@ -150,10 +150,17 @@ namespace connectivity { namespace hsqldb
m_bReadOnly = true;
}
}
- if ( !m_bReadOnly )
+ try
{
- Reference< XStatement > xStmt( m_xConnection->createStatement(), UNO_QUERY_THROW );
- xStmt->execute( OUString( "CHECKPOINT DEFRAG" ) );
+ if ( !m_bReadOnly )
+ {
+ Reference< XStatement > xStmt( m_xConnection->createStatement(), UNO_QUERY_THROW );
+ xStmt->execute( OUString( "CHECKPOINT DEFRAG" ) );
+ }
+ }
+ catch(const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
}
}