diff options
author | Jens Carl <j.carl43@gmx.de> | 2019-05-31 20:57:52 +0000 |
---|---|---|
committer | Jens Carl <j.carl43@gmx.de> | 2019-06-01 21:31:00 +0200 |
commit | af36ccc2143a7181964cc87077303ac5a5be205e (patch) | |
tree | d6b8bfb52459f4b8db4ed509ec9de610e340cbe1 /connectivity | |
parent | eebc452a508bb865fbbebe69771564e1d8fcb32b (diff) |
tdf#43157 Clean up OSL_VERIFY (replace with SAL_WARN)
Replace OSL_VERIFY with if-statement and SAL_WARN.
Change-Id: Iccc7e079d9f8778060bbebba3f8e9204fc351d8e
Reviewed-on: https://gerrit.libreoffice.org/73289
Tested-by: Jenkins
Reviewed-by: Jens Carl <j.carl43@gmx.de>
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/commontools/dbmetadata.cxx | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/connectivity/source/commontools/dbmetadata.cxx b/connectivity/source/commontools/dbmetadata.cxx index 4f4aa1e09353..026381e0377b 100644 --- a/connectivity/source/commontools/dbmetadata.cxx +++ b/connectivity/source/commontools/dbmetadata.cxx @@ -37,6 +37,7 @@ #include <comphelper/namedvaluecollection.hxx> #include <comphelper/processfactory.hxx> #include <sal/macros.h> +#include <sal/log.hxx> #include <boost/optional.hpp> @@ -278,7 +279,8 @@ namespace dbtools bool restrict( false ); Any setting; if ( lcl_getConnectionSetting( "EnableSQL92Check", *m_pImpl, setting ) ) - OSL_VERIFY( setting >>= restrict ); + if( ! (setting >>= restrict) ) + SAL_WARN("connectivity.commontools", "restrictIdentifiersToSQL92: unable to assign EnableSQL92Check"); return restrict; } @@ -288,7 +290,8 @@ namespace dbtools bool doGenerate( false ); Any setting; if ( lcl_getConnectionSetting( "GenerateASBeforeCorrelationName", *m_pImpl, setting ) ) - OSL_VERIFY( setting >>= doGenerate ); + if( ! (setting >>= doGenerate) ) + SAL_WARN("connectivity.commontools", "generateASBeforeCorrelationName: unable to assign GenerateASBeforeCorrelationName"); return doGenerate; } @@ -297,7 +300,8 @@ namespace dbtools bool doGenerate( true ); Any setting; if ( lcl_getConnectionSetting( "EscapeDateTime", *m_pImpl, setting ) ) - OSL_VERIFY( setting >>= doGenerate ); + if( ! (setting >>= doGenerate) ) + SAL_WARN("connectivity.commontools", "shouldEscapeDateTime: unable to assign EscapeDateTime"); return doGenerate; } @@ -306,7 +310,8 @@ namespace dbtools bool doSubstitute( true ); Any setting; if ( lcl_getConnectionSetting( "ParameterNameSubstitution", *m_pImpl, setting ) ) - OSL_VERIFY( setting >>= doSubstitute ); + if( ! (setting >>= doSubstitute) ) + SAL_WARN("connectivity.commontools", "shouldSubstituteParameterNames: unable to assign ParameterNameSubstitution"); return doSubstitute; } @@ -315,7 +320,8 @@ namespace dbtools bool is( true ); Any setting; if ( lcl_getDriverSetting( "AutoIncrementIsPrimaryKey", *m_pImpl, setting ) ) - OSL_VERIFY( setting >>= is ); + if( ! (setting >>= is) ) + SAL_WARN("connectivity.commontools", "isAutoIncrementPrimaryKey: unable to assign AutoIncrementIsPrimaryKey"); return is; } @@ -324,7 +330,8 @@ namespace dbtools sal_Int32 mode( BooleanComparisonMode::EQUAL_INTEGER ); Any setting; if ( lcl_getConnectionSetting( "BooleanComparisonMode", *m_pImpl, setting ) ) - OSL_VERIFY( setting >>= mode ); + if( ! (setting >>= mode) ) + SAL_WARN("connectivity.commontools", "getBooleanComparisonMode: unable to assign BooleanComparisonMode"); return mode; } @@ -361,7 +368,8 @@ namespace dbtools bool doGenerate( true ); Any setting; if ( lcl_getConnectionSetting( "ColumnAliasInOrderBy", *m_pImpl, setting ) ) - OSL_VERIFY( setting >>= doGenerate ); + if( ! (setting >>= doGenerate) ) + SAL_WARN("connectivity.commontools", "supportsColumnAliasInOrderBy: unable to assign ColumnAliasInOrderBy"); return doGenerate; } @@ -401,7 +409,8 @@ namespace dbtools #ifdef IMPLEMENTED_LATER Any setting; if ( lcl_getConnectionSetting( "DisplayEmptyTableFolders", *m_pImpl, setting ) ) - OSL_VERIFY( setting >>= doDisplay ); + if( ! (setting >>= doDisplay) ) + SAL_WARN("connectivity.commontools", "displayEmptyTableFolders: unable to assign DisplayEmptyTableFolders"); #else try { |