diff options
author | Ocke Janssen <oj@openoffice.org> | 2009-10-28 07:12:38 +0000 |
---|---|---|
committer | Ocke Janssen <oj@openoffice.org> | 2009-10-28 07:12:38 +0000 |
commit | 9543c83ef655a978a66634e71267c26837a122cf (patch) | |
tree | 47f93513a69f9b0b0f6d5307965989f2972805c4 /connectivity | |
parent | 56c0e48da62ea84c611a3cd313b55f3b04743673 (diff) |
#i105825# try catch in the wrong place
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/drivers/hsqldb/HDriver.cxx | 10 |
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); |