summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorOcke Janssen <oj@openoffice.org>2009-10-28 07:12:38 +0000
committerOcke Janssen <oj@openoffice.org>2009-10-28 07:12:38 +0000
commit9543c83ef655a978a66634e71267c26837a122cf (patch)
tree47f93513a69f9b0b0f6d5307965989f2972805c4 /connectivity
parent56c0e48da62ea84c611a3cd313b55f3b04743673 (diff)
#i105825# try catch in the wrong place
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/hsqldb/HDriver.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx
index 4c9577497525..7e97d27e1d86 100644
--- a/connectivity/source/drivers/hsqldb/HDriver.cxx
+++ b/connectivity/source/drivers/hsqldb/HDriver.cxx
@@ -263,7 +263,8 @@ namespace connectivity
);
aProperties.put( "SystemProperties", Sequence< NamedValue >( &aPermittedClasses, 1 ) );
- ::rtl::OUString sProperties( RTL_CONSTASCII_USTRINGPARAM( "properties" ) );
+ const ::rtl::OUString sProperties( RTL_CONSTASCII_USTRINGPARAM( "properties" ) );
+ ::rtl::OUString sMessage;
try
{
if ( !bIsNewDatabase && xStorage->isStreamElement(sProperties) )
@@ -288,8 +289,7 @@ namespace connectivity
|| ( nMajor == 1 && nMinor == 8 && nMicro > 0 ) )
{
::connectivity::SharedResources aResources;
- const ::rtl::OUString sMessage = aResources.getResourceString(STR_ERROR_NEW_VERSION);
- ::dbtools::throwGenericSQLException(sMessage ,*this);
+ sMessage = aResources.getResourceString(STR_ERROR_NEW_VERSION);
}
break;
}
@@ -302,6 +302,10 @@ namespace connectivity
catch(Exception&)
{
}
+ if ( sMessage.getLength() )
+ {
+ ::dbtools::throwGenericSQLException(sMessage ,*this);
+ }
// readonly?
Reference<XPropertySet> xProp(xStorage,UNO_QUERY);