diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2011-03-12 11:47:36 +0100 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2011-03-12 14:19:17 +0100 |
commit | d86e9a3906b5c2c51a7a04dac0a63c9f74196991 (patch) | |
tree | 6edeb296b93516795e8159f8c2ee04c544cc1874 /comphelper | |
parent | e6216e1ce6b399a10019b5d11b6fef6961fc0f74 (diff) |
Move OSL_ENSURE(false,...) to OSL_FAIL(...)
Diffstat (limited to 'comphelper')
-rw-r--r-- | comphelper/source/container/enumerablemap.cxx | 2 | ||||
-rw-r--r-- | comphelper/source/misc/accessiblewrapper.cxx | 3 | ||||
-rw-r--r-- | comphelper/source/misc/documentinfo.cxx | 2 | ||||
-rw-r--r-- | comphelper/source/misc/logging.cxx | 18 | ||||
-rw-r--r-- | comphelper/source/misc/mediadescriptor.cxx | 2 | ||||
-rw-r--r-- | comphelper/source/misc/namedvaluecollection.cxx | 2 | ||||
-rw-r--r-- | comphelper/source/misc/officeresourcebundle.cxx | 8 | ||||
-rw-r--r-- | comphelper/source/misc/scopeguard.cxx | 6 | ||||
-rw-r--r-- | comphelper/source/misc/servicedecl.cxx | 2 | ||||
-rw-r--r-- | comphelper/source/property/propagg.cxx | 2 | ||||
-rw-r--r-- | comphelper/source/property/propertycontainerhelper.cxx | 8 |
11 files changed, 27 insertions, 28 deletions
diff --git a/comphelper/source/container/enumerablemap.cxx b/comphelper/source/container/enumerablemap.cxx index b3864d9b8c06..ab0af3e53e8f 100644 --- a/comphelper/source/container/enumerablemap.cxx +++ b/comphelper/source/container/enumerablemap.cxx @@ -319,7 +319,7 @@ namespace comphelper return; } } - OSL_ENSURE( false, "lcl_revokeMapModificationListener: the listener is not registered!" ); + OSL_FAIL( "lcl_revokeMapModificationListener: the listener is not registered!" ); } //-------------------------------------------------------------------- diff --git a/comphelper/source/misc/accessiblewrapper.cxx b/comphelper/source/misc/accessiblewrapper.cxx index 2220e15563b9..693d2bbe3218 100644 --- a/comphelper/source/misc/accessiblewrapper.cxx +++ b/comphelper/source/misc/accessiblewrapper.cxx @@ -161,8 +161,7 @@ namespace comphelper if (!m_aChildrenMap.insert( AccessibleMap::value_type( _rxKey, xValue ) ).second) { - OSL_ENSURE( - false, + OSL_FAIL( "OWrappedAccessibleChildrenManager::" "getAccessibleWrapperFor: element was already" " inserted!" ); diff --git a/comphelper/source/misc/documentinfo.cxx b/comphelper/source/misc/documentinfo.cxx index c1884ba513c2..a9b9a85f7f69 100644 --- a/comphelper/source/misc/documentinfo.cxx +++ b/comphelper/source/misc/documentinfo.cxx @@ -187,7 +187,7 @@ namespace comphelper { sMessage += "\nin function:\n"; sMessage += BOOST_CURRENT_FUNCTION; sMessage += "\n"; - OSL_ENSURE( false, sMessage ); + OSL_FAIL( sMessage ); } return sTitle; diff --git a/comphelper/source/misc/logging.cxx b/comphelper/source/misc/logging.cxx index 48b99a6ff94d..6d87b0fb528a 100644 --- a/comphelper/source/misc/logging.cxx +++ b/comphelper/source/misc/logging.cxx @@ -104,7 +104,7 @@ namespace comphelper catch( const Exception& e ) { (void)e; - OSL_ENSURE( false, "EventLogger_Impl::impl_createLogger_nothrow: caught an exception!" ); + OSL_FAIL( "EventLogger_Impl::impl_createLogger_nothrow: caught an exception!" ); } } @@ -145,7 +145,7 @@ namespace comphelper catch( const Exception& e ) { (void)e; - OSL_ENSURE( false, "EventLogger::getLogLevel: caught an exception!" ); + OSL_FAIL( "EventLogger::getLogLevel: caught an exception!" ); } return LogLevel::OFF; @@ -162,7 +162,7 @@ namespace comphelper catch( const Exception& e ) { (void)e; - OSL_ENSURE( false, "EventLogger::setLogLevel: caught an exception!" ); + OSL_FAIL( "EventLogger::setLogLevel: caught an exception!" ); } } @@ -179,7 +179,7 @@ namespace comphelper catch( const Exception& e ) { (void)e; - OSL_ENSURE( false, "EventLogger::isLoggable: caught an exception!" ); + OSL_FAIL( "EventLogger::isLoggable: caught an exception!" ); } return false; @@ -199,7 +199,7 @@ namespace comphelper catch( const Exception& e ) { (void)e; - OSL_ENSURE( false, "EventLogger::addLogHandler: caught an exception!" ); + OSL_FAIL( "EventLogger::addLogHandler: caught an exception!" ); } return false; } @@ -218,7 +218,7 @@ namespace comphelper catch( const Exception& e ) { (void)e; - OSL_ENSURE( false, "EventLogger::removeLogHandler: caught an exception!" ); + OSL_FAIL( "EventLogger::removeLogHandler: caught an exception!" ); } return false; } @@ -292,7 +292,7 @@ namespace comphelper catch( const Exception& e ) { (void)e; - OSL_ENSURE( false, "EventLogger::impl_log: caught an exception!" ); + OSL_FAIL( "EventLogger::impl_log: caught an exception!" ); } return false; @@ -335,7 +335,7 @@ namespace comphelper catch( const Exception& e ) { (void)e; - OSL_ENSURE( false, "lcl_loadBundle_nothrow: caught an exception!" ); + OSL_FAIL( "lcl_loadBundle_nothrow: caught an exception!" ); } return _rLoggerData.xBundle.is(); @@ -356,7 +356,7 @@ namespace comphelper catch( const Exception& e ) { (void)e; - OSL_ENSURE( false, "lcl_loadString_nothrow: caught an exception!" ); + OSL_FAIL( "lcl_loadString_nothrow: caught an exception!" ); } return sMessage; } diff --git a/comphelper/source/misc/mediadescriptor.cxx b/comphelper/source/misc/mediadescriptor.cxx index 8dbe084cd3f5..f8b8ba7fde35 100644 --- a/comphelper/source/misc/mediadescriptor.cxx +++ b/comphelper/source/misc/mediadescriptor.cxx @@ -658,7 +658,7 @@ sal_Bool MediaDescriptor::impl_openStreamWithPostData( const css::uno::Reference // success? if ( !xResultStream.is() ) { - OSL_ENSURE( false, "no valid reply to the HTTP-Post" ); + OSL_FAIL( "no valid reply to the HTTP-Post" ); return sal_False; } diff --git a/comphelper/source/misc/namedvaluecollection.cxx b/comphelper/source/misc/namedvaluecollection.cxx index 3effa876c4c2..d758cee5f371 100644 --- a/comphelper/source/misc/namedvaluecollection.cxx +++ b/comphelper/source/misc/namedvaluecollection.cxx @@ -195,7 +195,7 @@ namespace comphelper ::rtl::OStringBuffer message; message.append( "NamedValueCollection::impl_assign: encountered a value type which I cannot handle:\n" ); message.append( ::rtl::OUStringToOString( pArgument->getValueTypeName(), RTL_TEXTENCODING_ASCII_US ) ); - OSL_ENSURE( false, message.makeStringAndClear() ); + OSL_FAIL( message.makeStringAndClear() ); } #endif } diff --git a/comphelper/source/misc/officeresourcebundle.cxx b/comphelper/source/misc/officeresourcebundle.cxx index 942a8e618261..2e2119cb2ee3 100644 --- a/comphelper/source/misc/officeresourcebundle.cxx +++ b/comphelper/source/misc/officeresourcebundle.cxx @@ -137,7 +137,7 @@ namespace comphelper } catch( const Exception& ) { - OSL_ENSURE( false, "ResourceBundle_Impl::loadString: caught an exception!" ); + OSL_FAIL( "ResourceBundle_Impl::loadString: caught an exception!" ); } } return sString; @@ -158,7 +158,7 @@ namespace comphelper } catch( const Exception& ) { - OSL_ENSURE( false, "ResourceBundle_Impl::hasString: caught an exception!" ); + OSL_FAIL( "ResourceBundle_Impl::hasString: caught an exception!" ); } } return has; @@ -182,7 +182,7 @@ namespace comphelper } catch( const Exception& ) { - OSL_ENSURE( false, "ResourceBundle_Impl::impl_loadBundle_nopthrow: could not create the resource loader!" ); + OSL_FAIL( "ResourceBundle_Impl::impl_loadBundle_nopthrow: could not create the resource loader!" ); } if ( !xLoader.is() ) @@ -194,7 +194,7 @@ namespace comphelper } catch( const MissingResourceException& ) { - OSL_ENSURE( false, "ResourceBundle_Impl::impl_loadBundle_nopthrow: missing the given resource bundle!" ); + OSL_FAIL( "ResourceBundle_Impl::impl_loadBundle_nopthrow: missing the given resource bundle!" ); } return m_xBundle.is(); diff --git a/comphelper/source/misc/scopeguard.cxx b/comphelper/source/misc/scopeguard.cxx index 66cfd231293d..a8df29a7ac81 100644 --- a/comphelper/source/misc/scopeguard.cxx +++ b/comphelper/source/misc/scopeguard.cxx @@ -46,14 +46,14 @@ ScopeGuard::~ScopeGuard() } catch (com::sun::star::uno::Exception & exc) { (void) exc; // avoid warning about unused variable - OSL_ENSURE( - false, rtl::OUStringToOString( + OSL_FAIL( + rtl::OUStringToOString( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "UNO exception occurred: ") ) + exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() ); } catch (...) { - OSL_ENSURE( false, "unknown exception occurred!" ); + OSL_FAIL( "unknown exception occurred!" ); } } else diff --git a/comphelper/source/misc/servicedecl.cxx b/comphelper/source/misc/servicedecl.cxx index 92e3b3ef7e44..c842f6298c08 100644 --- a/comphelper/source/misc/servicedecl.cxx +++ b/comphelper/source/misc/servicedecl.cxx @@ -142,7 +142,7 @@ bool ServiceDecl::writeInfo( registry::XRegistryKey * xKey ) const bRet = true; } catch (registry::InvalidRegistryException const&) { - OSL_ENSURE( false, "### InvalidRegistryException!" ); + OSL_FAIL( "### InvalidRegistryException!" ); } } return bRet; diff --git a/comphelper/source/property/propagg.cxx b/comphelper/source/property/propagg.cxx index 48270b8e6f94..a0ae86c9a735 100644 --- a/comphelper/source/property/propagg.cxx +++ b/comphelper/source/property/propagg.cxx @@ -727,7 +727,7 @@ void SAL_CALL OPropertySetAggregationHelper::setPropertyValues( aMessage.append( "\n(implementation " ); aMessage.append( typeid( *this ).name() ); aMessage.append( ")" ); - OSL_ENSURE( false, aMessage.getStr() ); + OSL_FAIL( aMessage.getStr() ); #endif } } diff --git a/comphelper/source/property/propertycontainerhelper.cxx b/comphelper/source/property/propertycontainerhelper.cxx index b11dea0f1c9b..6233efbc011f 100644 --- a/comphelper/source/property/propertycontainerhelper.cxx +++ b/comphelper/source/property/propertycontainerhelper.cxx @@ -256,7 +256,7 @@ sal_Bool OPropertyContainerHelper::convertFastPropertyValue( PropertiesIterator aPos = searchHandle(_nHandle); if (aPos == m_aProperties.end()) { - OSL_ENSURE( false, "OPropertyContainerHelper::convertFastPropertyValue: unknown handle!" ); + OSL_FAIL( "OPropertyContainerHelper::convertFastPropertyValue: unknown handle!" ); // should not happen if the derived class has built a correct property set info helper to be used by // our base class OPropertySetHelper return bModified; @@ -399,7 +399,7 @@ void OPropertyContainerHelper::setFastPropertyValue(sal_Int32 _nHandle, const An PropertiesIterator aPos = searchHandle(_nHandle); if (aPos == m_aProperties.end()) { - OSL_ENSURE( false, "OPropertyContainerHelper::setFastPropertyValue: unknown handle!" ); + OSL_FAIL( "OPropertyContainerHelper::setFastPropertyValue: unknown handle!" ); // should not happen if the derived class has built a correct property set info helper to be used by // our base class OPropertySetHelper return; @@ -441,7 +441,7 @@ void OPropertyContainerHelper::getFastPropertyValue(Any& _rValue, sal_Int32 _nHa PropertiesIterator aPos = const_cast<OPropertyContainerHelper*>(this)->searchHandle(_nHandle); if (aPos == m_aProperties.end()) { - OSL_ENSURE( false, "OPropertyContainerHelper::getFastPropertyValue: unknown handle!" ); + OSL_FAIL( "OPropertyContainerHelper::getFastPropertyValue: unknown handle!" ); // should not happen if the derived class has built a correct property set info helper to be used by // our base class OPropertySetHelper return; @@ -501,7 +501,7 @@ void OPropertyContainerHelper::modifyAttributes(sal_Int32 _nHandle, sal_Int32 _n PropertiesIterator aPos = searchHandle(_nHandle); if (aPos == m_aProperties.end()) { - OSL_ENSURE( false, "OPropertyContainerHelper::modifyAttributes: unknown handle!" ); + OSL_FAIL( "OPropertyContainerHelper::modifyAttributes: unknown handle!" ); // should not happen if the derived class has built a correct property set info helper to be used by // our base class OPropertySetHelper return; |