diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2011-03-12 14:27:45 +0100 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2011-03-13 16:50:43 +0100 |
commit | 1848de2f4cce84862cf0843e15f38ce5d1f26108 (patch) | |
tree | 38d3983e56f5d2c900c24750e0050556435cfd6b /connectivity/source | |
parent | e4d0bb122a93d243067814b9d43f9c9ab1e4df65 (diff) |
Move OSL_ENSURE(false,...) to OSL_FAIL(...)
Diffstat (limited to 'connectivity/source')
33 files changed, 54 insertions, 54 deletions
diff --git a/connectivity/source/commontools/DateConversion.cxx b/connectivity/source/commontools/DateConversion.cxx index 73f77f85cc6d..e02dd44c0e53 100644 --- a/connectivity/source/commontools/DateConversion.cxx +++ b/connectivity/source/commontools/DateConversion.cxx @@ -424,7 +424,7 @@ double DBTypeConversion::getValue(const Reference<XColumn>& xVariant, } catch (const Exception& ) { - OSL_ENSURE(false, "DBTypeConversion::getValue: caught an exception while asking for the format key!"); + OSL_FAIL("DBTypeConversion::getValue: caught an exception while asking for the format key!"); } if (!nKey) diff --git a/connectivity/source/commontools/FValue.cxx b/connectivity/source/commontools/FValue.cxx index ddcafc06fc91..88add8593e30 100644 --- a/connectivity/source/commontools/FValue.cxx +++ b/connectivity/source/commontools/FValue.cxx @@ -2157,7 +2157,7 @@ void ORowSetValue::impl_fill( const sal_Int32 _nType, sal_Bool _bNullable, const setTypeKind(DataType::OTHER); break; default: - OSL_ENSURE( false, "ORowSetValue::fill: unsupported type!" ); + OSL_FAIL( "ORowSetValue::fill: unsupported type!" ); (*this) = _rValueSource.getObject(); break; } @@ -2275,7 +2275,7 @@ void ORowSetValue::fill(const Any& _rValue) if ( _rValue >>= aDummy ) (*this) = aDummy; else - OSL_ENSURE( false, "ORowSetValue::fill: unsupported sequence type!" ); + OSL_FAIL( "ORowSetValue::fill: unsupported sequence type!" ); break; } @@ -2297,7 +2297,7 @@ void ORowSetValue::fill(const Any& _rValue) (*this) = aDateTime; } else - OSL_ENSURE( false, "ORowSetValue::fill: unsupported structure!" ); + OSL_FAIL( "ORowSetValue::fill: unsupported structure!" ); break; } diff --git a/connectivity/source/commontools/TTableHelper.cxx b/connectivity/source/commontools/TTableHelper.cxx index f0259e0de5f1..5d3027a627b1 100644 --- a/connectivity/source/commontools/TTableHelper.cxx +++ b/connectivity/source/commontools/TTableHelper.cxx @@ -245,7 +245,7 @@ namespace // if that's not the case, normalize it if ( bGaps || bDuplicates ) { - OSL_ENSURE( false, "lcl_sanitizeColumnDescs: database did provide invalid ORDINAL_POSITION values!" ); + OSL_FAIL( "lcl_sanitizeColumnDescs: database did provide invalid ORDINAL_POSITION values!" ); OrdinalPosition nNormalizedPosition = 1; for ( ::std::vector< ColumnDesc >::iterator normalize = _rColumns.begin(); diff --git a/connectivity/source/commontools/dbexception.cxx b/connectivity/source/commontools/dbexception.cxx index ea96f9cb0c9e..e79f0dda4d49 100644 --- a/connectivity/source/commontools/dbexception.cxx +++ b/connectivity/source/commontools/dbexception.cxx @@ -239,7 +239,7 @@ void SQLExceptionInfo::append( TYPE _eType, const ::rtl::OUString& _rErrorMessag case SQL_WARNING: aAppend <<= SQLWarning(); break; case SQL_CONTEXT: aAppend <<= SQLContext(); break; default: - OSL_ENSURE( false, "SQLExceptionInfo::append: invalid exception type: this will crash!" ); + OSL_FAIL( "SQLExceptionInfo::append: invalid exception type: this will crash!" ); break; } diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx index f78135404fe8..393a3db5b051 100644 --- a/connectivity/source/commontools/dbtools.cxx +++ b/connectivity/source/commontools/dbtools.cxx @@ -1438,7 +1438,7 @@ namespace _xTable->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_NAME)) >>= _out_rName; } else - OSL_ENSURE( false, "::dbtools::lcl_getTableNameComponents: this is no table object!" ); + OSL_FAIL( "::dbtools::lcl_getTableNameComponents: this is no table object!" ); } } diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx index 6288a543d241..5306e37a7673 100644 --- a/connectivity/source/commontools/dbtools2.cxx +++ b/connectivity/source/commontools/dbtools2.cxx @@ -469,7 +469,7 @@ namespace } catch(SQLException&) { - OSL_ENSURE( false, "lcl_createSDBCXColumn: caught an exception!" ); + OSL_FAIL( "lcl_createSDBCXColumn: caught an exception!" ); } } diff --git a/connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx b/connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx index 8bde02cd5239..e8acf0ad3613 100644 --- a/connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx +++ b/connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx @@ -535,7 +535,7 @@ KeyTypeEnum OAdoKey::Map2KeyRule(const sal_Int32& _eNum) eNum = adKeyUnique; break; default: - OSL_ENSURE( false, "OAdoKey::Map2KeyRule: invalid key type!" ); + OSL_FAIL( "OAdoKey::Map2KeyRule: invalid key type!" ); } return eNum; } diff --git a/connectivity/source/drivers/ado/adoimp.cxx b/connectivity/source/drivers/ado/adoimp.cxx index 9f8c0afb96b3..0ccb8916ecb8 100644 --- a/connectivity/source/drivers/ado/adoimp.cxx +++ b/connectivity/source/drivers/ado/adoimp.cxx @@ -263,7 +263,7 @@ sal_Int32 ADOS::mapAdoType2Object(ObjectTypeEnum objType) nType = PrivilegeObject::COLUMN; break; default: - OSL_ENSURE( false, "ADOS::mapAdoType2Object: privilege type cannot be translated!" ); + OSL_FAIL( "ADOS::mapAdoType2Object: privilege type cannot be translated!" ); break; } return nType; diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx index a37214e80a6c..123e68330715 100644 --- a/connectivity/source/drivers/dbase/DTable.cxx +++ b/connectivity/source/drivers/dbase/DTable.cxx @@ -600,7 +600,7 @@ BOOL ODbaseTable::ReadMemoHeader() (*m_pMemoStream) >> m_aMemoHeader.db_size; break; default: - OSL_ENSURE( false, "ODbaseTable::ReadMemoHeader: unsupported memo type!" ); + OSL_FAIL( "ODbaseTable::ReadMemoHeader: unsupported memo type!" ); break; } return TRUE; diff --git a/connectivity/source/drivers/evoab/LDriver.cxx b/connectivity/source/drivers/evoab/LDriver.cxx index 637203e787d9..53ac9fc3ec39 100644 --- a/connectivity/source/drivers/evoab/LDriver.cxx +++ b/connectivity/source/drivers/evoab/LDriver.cxx @@ -233,7 +233,7 @@ sal_Bool SAL_CALL OEvoabDriver::acceptsURL( const ::rtl::OUString& url ) if ( nFileErr != osl_File_E_None ) { ::rtl::OUString sErr = translateFileErrorMessage( nFileErr); - OSL_ENSURE(false, ::rtl::OUStringToOString( sErr, RTL_TEXTENCODING_ASCII_US ).getStr()); + OSL_FAIL(::rtl::OUStringToOString( sErr, RTL_TEXTENCODING_ASCII_US ).getStr()); } ::rtl::OUString aVersionInfo; if ( nFileErr == osl_File_E_None && nBytesRead > 0 && nBytesRead <= 256) diff --git a/connectivity/source/drivers/evoab2/NStatement.cxx b/connectivity/source/drivers/evoab2/NStatement.cxx index 2ea738ad3419..30773e4ea665 100644 --- a/connectivity/source/drivers/evoab2/NStatement.cxx +++ b/connectivity/source/drivers/evoab2/NStatement.cxx @@ -477,10 +477,10 @@ rtl::OUString OCommonStatement::getTableName() OSQLParseNode::getTableComponents( pNodeForTableName, aCatalog, aSchema, aTableName,NULL); } else - OSL_ENSURE( false, "odd table layout" ); + OSL_FAIL( "odd table layout" ); } else - OSL_ENSURE( false, "unusual table layout" ); + OSL_FAIL( "unusual table layout" ); } return aTableName; } diff --git a/connectivity/source/drivers/file/FResultSet.cxx b/connectivity/source/drivers/file/FResultSet.cxx index b9f60f63b076..895afd6f9e9a 100644 --- a/connectivity/source/drivers/file/FResultSet.cxx +++ b/connectivity/source/drivers/file/FResultSet.cxx @@ -1607,7 +1607,7 @@ BOOL OResultSet::OpenImpl() m_nRowCountResult = 1; break; default: - OSL_ENSURE( false, "OResultSet::OpenImpl: unsupported statement type!" ); + OSL_FAIL( "OResultSet::OpenImpl: unsupported statement type!" ); break; } diff --git a/connectivity/source/drivers/file/FTable.cxx b/connectivity/source/drivers/file/FTable.cxx index 1aadb836fbac..4ee04b5d99c7 100644 --- a/connectivity/source/drivers/file/FTable.cxx +++ b/connectivity/source/drivers/file/FTable.cxx @@ -226,13 +226,13 @@ BOOL OFileTable::UpdateRow(OValueRefVector& /*rRow*/, OValueRefRow& /*pOrgRow*/, void OFileTable::addColumn(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& /*descriptor*/) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OFileTable::addColumn" ); - OSL_ENSURE( false, "OFileTable::addColumn: not implemented!" ); + OSL_FAIL( "OFileTable::addColumn: not implemented!" ); } // ----------------------------------------------------------------------------- void OFileTable::dropColumn(sal_Int32 /*_nPos*/) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OFileTable::dropColumn" ); - OSL_ENSURE( false, "OFileTable::addColumn: not implemented!" ); + OSL_FAIL( "OFileTable::addColumn: not implemented!" ); } // ----------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/file/fcomp.cxx b/connectivity/source/drivers/file/fcomp.cxx index f4a87d0ba1a1..634ee8e67608 100644 --- a/connectivity/source/drivers/file/fcomp.cxx +++ b/connectivity/source/drivers/file/fcomp.cxx @@ -274,7 +274,7 @@ OOperand* OPredicateCompiler::execute_COMPARE(OSQLParseNode* pPredicateNode) th else if (pPrec->getNodeType() == SQL_NODE_GREAT) ePredicateType = SQLFilterOperator::GREATER; else - OSL_ENSURE( false, "OPredicateCompiler::execute_COMPARE: unexpected node type!" ); + OSL_FAIL( "OPredicateCompiler::execute_COMPARE: unexpected node type!" ); execute(pPredicateNode->getChild(0)); execute(pPredicateNode->getChild(2)); diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx index 2a2b33a65154..818fb4d293e1 100644 --- a/connectivity/source/drivers/hsqldb/HDriver.cxx +++ b/connectivity/source/drivers/hsqldb/HDriver.cxx @@ -638,7 +638,7 @@ namespace connectivity } catch(Exception&) { - OSL_ENSURE( false, "ODriverDelegator::preCommit: caught an exception!" ); + OSL_FAIL( "ODriverDelegator::preCommit: caught an exception!" ); } } } @@ -789,7 +789,7 @@ namespace connectivity // second round, this time without matching the country return lcl_getCollationForLocale( _rLocaleString, true ); - OSL_ENSURE( false, "lcl_getCollationForLocale: unknown locale string, falling back to Latin1_General!" ); + OSL_FAIL( "lcl_getCollationForLocale: unknown locale string, falling back to Latin1_General!" ); return "Latin1_General"; } diff --git a/connectivity/source/drivers/hsqldb/HStorageAccess.cxx b/connectivity/source/drivers/hsqldb/HStorageAccess.cxx index cefec2c3ee08..04f15cab4a21 100644 --- a/connectivity/source/drivers/hsqldb/HStorageAccess.cxx +++ b/connectivity/source/drivers/hsqldb/HStorageAccess.cxx @@ -92,7 +92,7 @@ SAL_DLLPUBLIC_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStor } catch(Exception&) { - OSL_ENSURE( false, "NativeStorageAccess::close: caught an exception while flushing!" ); + OSL_FAIL( "NativeStorageAccess::close: caught an exception while flushing!" ); } #ifdef HSQLDB_DBG { diff --git a/connectivity/source/drivers/hsqldb/HStorageMap.cxx b/connectivity/source/drivers/hsqldb/HStorageMap.cxx index 67daadd3515a..535f821c4902 100644 --- a/connectivity/source/drivers/hsqldb/HStorageMap.cxx +++ b/connectivity/source/drivers/hsqldb/HStorageMap.cxx @@ -313,7 +313,7 @@ namespace connectivity if ( _nMode < 16 ) sMessage += "0"; sMessage += ::rtl::OString::valueOf( _nMode, 16 ).toAsciiUpperCase(); - OSL_ENSURE( false, sMessage.getStr() ); + OSL_FAIL( sMessage.getStr() ); #endif StorageContainer::throwJavaException(e,env); } diff --git a/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx b/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx index 4ef88ff7bdca..8bae08b4bf30 100644 --- a/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx +++ b/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx @@ -213,7 +213,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb } catch(Exception&) { - OSL_ENSURE( false, "StorageNativeOutputStream::sync: could not flush output stream!" ); + OSL_FAIL( "StorageNativeOutputStream::sync: could not flush output stream!" ); } } } diff --git a/connectivity/source/drivers/kab/KDriver.cxx b/connectivity/source/drivers/kab/KDriver.cxx index 20105d9b5db0..8c5554082078 100644 --- a/connectivity/source/drivers/kab/KDriver.cxx +++ b/connectivity/source/drivers/kab/KDriver.cxx @@ -106,7 +106,7 @@ namespace if ( !_rFunction ) { // did not find the symbol - OSL_ENSURE( false, ::rtl::OString( "lcl_getFunctionFromModuleOrUnload: could not find the symbol " ) + ::rtl::OString( _pAsciiSymbolName ) ); + OSL_FAIL( ::rtl::OString( "lcl_getFunctionFromModuleOrUnload: could not find the symbol " ) + ::rtl::OString( _pAsciiSymbolName ) ); osl_unloadModule( _rModule ); _rModule = NULL; } diff --git a/connectivity/source/drivers/macab/MacabDriver.cxx b/connectivity/source/drivers/macab/MacabDriver.cxx index ed6c40867c2a..92d3e0f16963 100644 --- a/connectivity/source/drivers/macab/MacabDriver.cxx +++ b/connectivity/source/drivers/macab/MacabDriver.cxx @@ -84,7 +84,7 @@ namespace if ( !_rFunction ) { // did not find the symbol - OSL_ENSURE( false, ::rtl::OString( "lcl_getFunctionFromModuleOrUnload: could not find the symbol " ) + ::rtl::OString( _pAsciiSymbolName ) ); + OSL_FAIL( ::rtl::OString( "lcl_getFunctionFromModuleOrUnload: could not find the symbol " ) + ::rtl::OString( _pAsciiSymbolName ) ); osl_unloadModule( _rModule ); _rModule = NULL; } diff --git a/connectivity/source/drivers/macab/MacabRecords.cxx b/connectivity/source/drivers/macab/MacabRecords.cxx index 93cbca5b79f6..86d34a808355 100644 --- a/connectivity/source/drivers/macab/MacabRecords.cxx +++ b/connectivity/source/drivers/macab/MacabRecords.cxx @@ -448,7 +448,7 @@ MacabHeader *MacabRecords::createHeaderForRecordType(const CFArrayRef _records, else { // Couldn't find a required property... - OSL_ENSURE(false, ::rtl::OString("MacabRecords::createHeaderForRecordType: could not find required property: ") + + OSL_FAIL(::rtl::OString("MacabRecords::createHeaderForRecordType: could not find required property: ") + ::rtl::OUStringToOString(CFStringToOUString(requiredProperties[i]), RTL_TEXTENCODING_ASCII_US)); } } diff --git a/connectivity/source/drivers/mozab/MColumnAlias.cxx b/connectivity/source/drivers/mozab/MColumnAlias.cxx index 211a7c307542..4585bddd6331 100644 --- a/connectivity/source/drivers/mozab/MColumnAlias.cxx +++ b/connectivity/source/drivers/mozab/MColumnAlias.cxx @@ -174,7 +174,7 @@ void OColumnAlias::initialize( const ::com::sun::star::uno::Reference< ::com::su AliasMap::const_iterator pos = m_aAliasMap.find( _rAlias ); if ( pos == m_aAliasMap.end() ) { - OSL_ENSURE( false, "OColumnAlias::getProgrammaticNameOrFallbackToUTF8Alias: no programmatic name for this alias!" ); + OSL_FAIL( "OColumnAlias::getProgrammaticNameOrFallbackToUTF8Alias: no programmatic name for this alias!" ); return ::rtl::OUStringToOString( _rAlias, RTL_TEXTENCODING_UTF8 ); } return pos->second.programmaticAsciiName; diff --git a/connectivity/source/drivers/mozab/MConnection.cxx b/connectivity/source/drivers/mozab/MConnection.cxx index df121ffeacce..943bb7cc774e 100644 --- a/connectivity/source/drivers/mozab/MConnection.cxx +++ b/connectivity/source/drivers/mozab/MConnection.cxx @@ -573,11 +573,11 @@ void OConnection::throwSQLException( const ErrorDescriptor& _rError, const Refer "$1$", sParameter ) ); ::dbtools::throwGenericSQLException( sError, _rxContext ); - OSL_ENSURE( false, "OConnection::throwSQLException: unreachable (1)!" ); + OSL_FAIL( "OConnection::throwSQLException: unreachable (1)!" ); } throwGenericSQLException( _rError.getResId(), _rxContext ); - OSL_ENSURE( false, "OConnection::throwSQLException: unreachable (2)!" ); + OSL_FAIL( "OConnection::throwSQLException: unreachable (2)!" ); } if ( _rError.getErrorCondition() != 0 ) @@ -588,7 +588,7 @@ void OConnection::throwSQLException( const ErrorDescriptor& _rError, const Refer aErrorHelper.raiseException( _rError.getErrorCondition(), _rxContext, sParameter ); else aErrorHelper.raiseException( _rError.getErrorCondition(), _rxContext); - OSL_ENSURE( false, "OConnection::throwSQLException: unreachable (3)!" ); + OSL_FAIL( "OConnection::throwSQLException: unreachable (3)!" ); } throwGenericSQLException( STR_UNSPECIFIED_ERROR, _rxContext ); diff --git a/connectivity/source/drivers/mozab/MDriver.cxx b/connectivity/source/drivers/mozab/MDriver.cxx index c0f0a39316bb..3132834c58bd 100644 --- a/connectivity/source/drivers/mozab/MDriver.cxx +++ b/connectivity/source/drivers/mozab/MDriver.cxx @@ -283,7 +283,7 @@ namespace if ( !_rFunction ) { // did not find the symbol - OSL_ENSURE( false, ::rtl::OString( "lcl_getFunctionFromModuleOrUnload: could not find the symbol " ) + ::rtl::OString( _pAsciiSymbolName ) ); + OSL_FAIL( ::rtl::OString( "lcl_getFunctionFromModuleOrUnload: could not find the symbol " ) + ::rtl::OString( _pAsciiSymbolName ) ); osl_unloadModule( _rModule ); _rModule = NULL; } diff --git a/connectivity/source/drivers/mozab/MResultSet.cxx b/connectivity/source/drivers/mozab/MResultSet.cxx index a41cbf780713..d50c9817aeb8 100644 --- a/connectivity/source/drivers/mozab/MResultSet.cxx +++ b/connectivity/source/drivers/mozab/MResultSet.cxx @@ -172,7 +172,7 @@ void OResultSet::methodEntry() checkDisposed(OResultSet_BASE::rBHelper.bDisposed); if ( !m_pTable ) { - OSL_ENSURE( false, "OResultSet::methodEntry: looks like we're disposed, but how is this possible?" ); + OSL_FAIL( "OResultSet::methodEntry: looks like we're disposed, but how is this possible?" ); throw DisposedException( ::rtl::OUString(), *this ); } } @@ -642,7 +642,7 @@ sal_Bool OResultSet::convertFastPropertyValue( const Any& /*rValue*/ ) throw (::com::sun::star::lang::IllegalArgumentException) { - OSL_ENSURE( false, "OResultSet::convertFastPropertyValue: not implemented!" ); + OSL_FAIL( "OResultSet::convertFastPropertyValue: not implemented!" ); switch(nHandle) { case PROPERTY_ID_ISBOOKMARKABLE: @@ -663,7 +663,7 @@ void OResultSet::setFastPropertyValue_NoBroadcast( ) throw (Exception) { - OSL_ENSURE( false, "OResultSet::setFastPropertyValue_NoBroadcast: not implemented!" ); + OSL_FAIL( "OResultSet::setFastPropertyValue_NoBroadcast: not implemented!" ); switch(nHandle) { case PROPERTY_ID_ISBOOKMARKABLE: diff --git a/connectivity/source/drivers/mozab/MResultSetMetaData.cxx b/connectivity/source/drivers/mozab/MResultSetMetaData.cxx index 99894fb750e1..042207f6618e 100644 --- a/connectivity/source/drivers/mozab/MResultSetMetaData.cxx +++ b/connectivity/source/drivers/mozab/MResultSetMetaData.cxx @@ -175,7 +175,7 @@ sal_Bool SAL_CALL OResultSetMetaData::isSearchable( sal_Int32 column ) throw(SQL if ( !m_pTable || !m_pTable->getConnection() ) { - OSL_ENSURE( false, "OResultSetMetaData::isSearchable: suspicious: called without table or connection!" ); + OSL_FAIL( "OResultSetMetaData::isSearchable: suspicious: called without table or connection!" ); return sal_False; } diff --git a/connectivity/source/drivers/mozab/MStatement.cxx b/connectivity/source/drivers/mozab/MStatement.cxx index 709676b21966..2070f8da37c8 100644 --- a/connectivity/source/drivers/mozab/MStatement.cxx +++ b/connectivity/source/drivers/mozab/MStatement.cxx @@ -255,7 +255,7 @@ OCommonStatement::StatementType OCommonStatement::parseSql( const ::rtl::OUStrin } getOwnConnection()->throwSQLException( STR_QUERY_TOO_COMPLEX, *this ); - OSL_ENSURE( false, "OCommonStatement::parseSql: unreachable!" ); + OSL_FAIL( "OCommonStatement::parseSql: unreachable!" ); return eSelect; } diff --git a/connectivity/source/drivers/mozab/mozillasrc/MLdapAttributeMap.cxx b/connectivity/source/drivers/mozab/mozillasrc/MLdapAttributeMap.cxx index 4af7668e4ec2..7f625c59a1b7 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MLdapAttributeMap.cxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MLdapAttributeMap.cxx @@ -188,7 +188,7 @@ namespace connectivity { namespace mozab { // ------------------------------------------------------------------- NS_IMETHODIMP MLdapAttributeMap::GetAttributes(const nsACString & aProperty, PRUint32* aCount, char*** aAttrs) { - OSL_ENSURE( false, "MLdapAttributeMap::GetAttributes: not implemented!" ); + OSL_FAIL( "MLdapAttributeMap::GetAttributes: not implemented!" ); (void)aProperty; (void)aCount; (void)aAttrs; @@ -220,7 +220,7 @@ namespace connectivity { namespace mozab { // ------------------------------------------------------------------- NS_IMETHODIMP MLdapAttributeMap::SetAttributeList(const nsACString & aProperty, const nsACString & aAttributeList, PRBool allowInconsistencies) { - OSL_ENSURE( false, "MLdapAttributeMap::SetAttributeList: not implemented!" ); + OSL_FAIL( "MLdapAttributeMap::SetAttributeList: not implemented!" ); (void)aProperty; (void)aAttributeList; (void)allowInconsistencies; @@ -230,7 +230,7 @@ namespace connectivity { namespace mozab { // ------------------------------------------------------------------- NS_IMETHODIMP MLdapAttributeMap::GetProperty(const nsACString & aAttribute, nsACString & _retval) { - OSL_ENSURE( false, "MLdapAttributeMap::GetProperty: not implemented!" ); + OSL_FAIL( "MLdapAttributeMap::GetProperty: not implemented!" ); (void)aAttribute; (void)_retval; return NS_ERROR_NOT_IMPLEMENTED; @@ -266,7 +266,7 @@ namespace connectivity { namespace mozab { // ------------------------------------------------------------------- NS_IMETHODIMP MLdapAttributeMap::SetFromPrefs(const nsACString & aPrefBranchName) { - OSL_ENSURE( false, "MLdapAttributeMap::SetFromPrefs: not implemented!" ); + OSL_FAIL( "MLdapAttributeMap::SetFromPrefs: not implemented!" ); (void)aPrefBranchName; return NS_ERROR_NOT_IMPLEMENTED; } @@ -396,7 +396,7 @@ namespace connectivity { namespace mozab { _card.SetPreferMailFormat(format); } else - OSL_ENSURE( false, "MLdapAttributeMap::fillCardFromResult: unexpected property without default setters!" ); + OSL_FAIL( "MLdapAttributeMap::fillCardFromResult: unexpected property without default setters!" ); } } } @@ -439,7 +439,7 @@ namespace connectivity { namespace mozab { } } else - OSL_ENSURE( false, "MLdapAttributeMap::fillResultFromCard: unexpected property without default getters!" ); + OSL_FAIL( "MLdapAttributeMap::fillResultFromCard: unexpected property without default getters!" ); } _result.insert( prop->first, resultValue ); diff --git a/connectivity/source/drivers/odbcbase/OStatement.cxx b/connectivity/source/drivers/odbcbase/OStatement.cxx index f6d6a78323b2..8a92fa87911c 100644 --- a/connectivity/source/drivers/odbcbase/OStatement.cxx +++ b/connectivity/source/drivers/odbcbase/OStatement.cxx @@ -839,7 +839,7 @@ void OStatement_Base::setResultSetType(sal_Int32 _par0) nSet = SQL_SENSITIVE; break; default: - OSL_ENSURE( false, "OStatement_Base::setResultSetType: invalid result set type!" ); + OSL_FAIL( "OStatement_Base::setResultSetType: invalid result set type!" ); break; } @@ -1048,7 +1048,7 @@ void OStatement_Base::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const A setEscapeProcessing( ::comphelper::getBOOL( rValue ) ); break; default: - OSL_ENSURE( false, "OStatement_Base::setFastPropertyValue_NoBroadcast: what property?" ); + OSL_FAIL( "OStatement_Base::setFastPropertyValue_NoBroadcast: what property?" ); break; } } @@ -1093,7 +1093,7 @@ void OStatement_Base::getFastPropertyValue(Any& rValue,sal_Int32 nHandle) const rValue <<= getEscapeProcessing(); break; default: - OSL_ENSURE( false, "OStatement_Base::getFastPropertyValue: what property?" ); + OSL_FAIL( "OStatement_Base::getFastPropertyValue: what property?" ); break; } } diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx index 8bcf122e22de..1f8ef88242d2 100644 --- a/connectivity/source/parse/sqliterator.cxx +++ b/connectivity/source/parse/sqliterator.cxx @@ -376,7 +376,7 @@ OSQLTable OSQLParseTreeIterator::impl_locateRecordSource( const ::rtl::OUString& RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::impl_locateRecordSource" ); if ( !_rComposedName.getLength() ) { - OSL_ENSURE( false, "OSQLParseTreeIterator::impl_locateRecordSource: no object name at all?" ); + OSL_FAIL( "OSQLParseTreeIterator::impl_locateRecordSource: no object name at all?" ); return OSQLTable(); } @@ -605,7 +605,7 @@ const OSQLParseNode* OSQLParseTreeIterator::getTableNode( OSQLTables& _rTables, } else { - OSL_ENSURE( false, "OSQLParseTreeIterator::getTableNode: subquery which is no select_statement: not yet implemented!" ); + OSL_FAIL( "OSQLParseTreeIterator::getTableNode: subquery which is no select_statement: not yet implemented!" ); } } } @@ -614,7 +614,7 @@ const OSQLParseNode* OSQLParseTreeIterator::getTableNode( OSQLTables& _rTables, pTableNameNode = pTableRef->getChild(0); } else - OSL_ENSURE( false, "OSQLParseTreeIterator::getTableNode: unhandled case!" ); + OSL_FAIL( "OSQLParseTreeIterator::getTableNode: unhandled case!" ); } return pTableNameNode; diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx index 742e059617b6..c69017e0744b 100644 --- a/connectivity/source/parse/sqlnode.cxx +++ b/connectivity/source/parse/sqlnode.cxx @@ -314,7 +314,7 @@ void OSQLParseNode::parseNodeToStr(::rtl::OUString& rString, } catch( const SQLException& ) { - OSL_ENSURE( false, "OSQLParseNode::parseNodeToStr: this should not throw!" ); + OSL_FAIL( "OSQLParseNode::parseNodeToStr: this should not throw!" ); // our callers don't expect this method to throw anything. The only known situation // where impl_parseNodeToString_throw can throw is when there is a cyclic reference // in the sub queries, but this cannot be the case here, as we do not parse to @@ -702,7 +702,7 @@ void OSQLParseNode::impl_parseLikeNodeToString_throw( ::rtl::OUStringBuffer& rSt } catch ( Exception& ) { - OSL_ENSURE( false, "OSQLParseNode::impl_parseLikeNodeToString_throw Exception occurred!" ); + OSL_FAIL( "OSQLParseNode::impl_parseLikeNodeToString_throw Exception occurred!" ); } if ( !m_aChildren[0]->isLeaf() ) { @@ -1980,7 +1980,7 @@ void OSQLParseNode::negateSearchCondition(OSQLParseNode*& pSearchCondition,sal_B pNewComparison = new OSQLParseNode(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("=")),SQL_NODE_EQUAL,SQL_EQUAL); break; default: - OSL_ENSURE( false, "OSQLParseNode::negateSearchCondition: unexpected node type!" ); + OSL_FAIL( "OSQLParseNode::negateSearchCondition: unexpected node type!" ); break; } pSearchCondition->replace(pComparison, pNewComparison); @@ -2369,7 +2369,7 @@ void OSQLParseNode::showParseTree( ::rtl::OUStringBuffer& _inout_rBuffer, sal_uI default: OSL_TRACE( "-- %i", int( m_eNodeType ) ); - OSL_ENSURE( false, "OSQLParser::ShowParseTree: unzulaessiger NodeType" ); + OSL_FAIL( "OSQLParser::ShowParseTree: unzulaessiger NodeType" ); } } } diff --git a/connectivity/source/sdbcx/VIndex.cxx b/connectivity/source/sdbcx/VIndex.cxx index e05b6e43056b..3326952d231d 100644 --- a/connectivity/source/sdbcx/VIndex.cxx +++ b/connectivity/source/sdbcx/VIndex.cxx @@ -177,7 +177,7 @@ Reference< ::com::sun::star::container::XNameAccess > SAL_CALL OIndex::getColumn } catch( const Exception& ) { - OSL_ENSURE( false, "OIndex::getColumns: caught an exception!" ); + OSL_FAIL( "OIndex::getColumns: caught an exception!" ); } return const_cast<OIndex*>(this)->m_pColumns; diff --git a/connectivity/source/sdbcx/VUser.cxx b/connectivity/source/sdbcx/VUser.cxx index 1b4a9b132c90..7bcdd52f8541 100644 --- a/connectivity/source/sdbcx/VUser.cxx +++ b/connectivity/source/sdbcx/VUser.cxx @@ -176,7 +176,7 @@ void SAL_CALL OUser::revokePrivileges( const ::rtl::OUString& /*objName*/, sal_I // ----------------------------------------------------------------------------- void SAL_CALL OUser::setName( const ::rtl::OUString& /*aName*/ ) throw(::com::sun::star::uno::RuntimeException) { - OSL_ENSURE( false, "OUser::setName: not implemented!" ); + OSL_FAIL( "OUser::setName: not implemented!" ); // not allowed to throw an SQLException here ... } // ----------------------------------------------------------------------------- |