summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2011-03-19 14:11:09 +0100
committerThomas Arnhold <thomas@arnhold.org>2011-03-19 14:11:09 +0100
commit3d874bdf409ca4a099853b30aeb9932e45c56f60 (patch)
tree3b88c39fa7cf3aa598a286534afc7de6f4ec98ab /unotools
parent4edacef4f14f1992f8e0cbded5a86730c8353b4d (diff)
Move OSL_ENSURE(sal_False,...) to OSL_FAIL(...)
Diffstat (limited to 'unotools')
-rw-r--r--unotools/inc/unotools/loghelper.hxx2
-rw-r--r--unotools/source/config/configitem.cxx12
-rw-r--r--unotools/source/config/configmgr.cxx14
-rw-r--r--unotools/source/config/confignode.cxx24
-rw-r--r--unotools/source/config/itemholder1.cxx2
-rw-r--r--unotools/source/config/moduleoptions.cxx2
-rw-r--r--unotools/source/config/viewoptions.cxx2
-rw-r--r--unotools/source/misc/desktopterminationobserver.cxx2
-rw-r--r--unotools/source/misc/eventlisteneradapter.cxx2
-rw-r--r--unotools/source/misc/sharedunocomponent.cxx6
-rw-r--r--unotools/source/ucbhelper/ucbhelper.cxx2
11 files changed, 35 insertions, 35 deletions
diff --git a/unotools/inc/unotools/loghelper.hxx b/unotools/inc/unotools/loghelper.hxx
index 4427d45445f0..bae5c7ed09c4 100644
--- a/unotools/inc/unotools/loghelper.hxx
+++ b/unotools/inc/unotools/loghelper.hxx
@@ -45,7 +45,7 @@ inline void logIt(const css::uno::Exception& ex)
sMsg.appendAscii("Unexpected exception catched. Original message was:\n\"" );
sMsg.append(ex.Message);
sMsg.appendAscii("\"");
- OSL_ENSURE(sal_False, ::rtl::OUStringToOString(sMsg.makeStringAndClear(), RTL_TEXTENCODING_UTF8).getStr());
+ OSL_FAIL(::rtl::OUStringToOString(sMsg.makeStringAndClear(), RTL_TEXTENCODING_UTF8).getStr());
}
#endif
diff --git a/unotools/source/config/configitem.cxx b/unotools/source/config/configitem.cxx
index b7dac4dcfab9..4a3809c222fb 100644
--- a/unotools/source/config/configitem.cxx
+++ b/unotools/source/config/configitem.cxx
@@ -69,7 +69,7 @@ inline void lcl_CFG_DBG_EXCEPTION(const sal_Char* cText, const Exception& rEx)
{
OString sMsg(cText);
sMsg += OString(rEx.Message.getStr(), rEx.Message.getLength(), RTL_TEXTENCODING_ASCII_US);
- OSL_ENSURE(sal_False, sMsg.getStr());
+ OSL_FAIL(sMsg.getStr());
}
#define CATCH_INFO(a) \
catch(Exception& rEx) \
@@ -482,7 +482,7 @@ Sequence< sal_Bool > ConfigItem::GetReadOnlyStates(const com::sun::star::uno::Se
{
if(pImpl->pManager->IsLocalConfigProvider() && lcl_IsLocalProperty(sSubTree, rNames[i]))
{
- OSL_ENSURE(sal_False, "ConfigItem::IsReadonly()\nlocal mode seams to be used!?\n");
+ OSL_FAIL("ConfigItem::IsReadonly()\nlocal mode seams to be used!?\n");
continue;
}
@@ -493,7 +493,7 @@ Sequence< sal_Bool > ConfigItem::GetReadOnlyStates(const com::sun::star::uno::Se
::utl::splitLastFromConfigurationPath(sName,sPath,sProperty);
if (!sPath.getLength() && !sProperty.getLength())
{
- OSL_ENSURE(sal_False, "ConfigItem::IsReadonly()\nsplitt failed\n");
+ OSL_FAIL("ConfigItem::IsReadonly()\nsplitt failed\n");
continue;
}
@@ -505,7 +505,7 @@ Sequence< sal_Bool > ConfigItem::GetReadOnlyStates(const com::sun::star::uno::Se
Any aNode = xHierarchyAccess->getByHierarchicalName(sPath);
if (!(aNode >>= xNode) || !xNode.is())
{
- OSL_ENSURE(sal_False, "ConfigItem::IsReadonly()\nno set available\n");
+ OSL_FAIL("ConfigItem::IsReadonly()\nno set available\n");
continue;
}
}
@@ -528,7 +528,7 @@ Sequence< sal_Bool > ConfigItem::GetReadOnlyStates(const com::sun::star::uno::Se
if (!xInfo.is())
{
- OSL_ENSURE(sal_False, "ConfigItem::IsReadonly()\nno prop info available\n");
+ OSL_FAIL("ConfigItem::IsReadonly()\nno prop info available\n");
continue;
}
@@ -581,7 +581,7 @@ Sequence< Any > ConfigItem::GetProperties(const Sequence< OUString >& rNames)
sMsg += OString(pNames[i].getStr(),
pNames[i].getLength(),
RTL_TEXTENCODING_ASCII_US);
- OSL_ENSURE(sal_False, sMsg.getStr());
+ OSL_FAIL(sMsg.getStr());
#else
(void) rEx; // avoid warning
#endif
diff --git a/unotools/source/config/configmgr.cxx b/unotools/source/config/configmgr.cxx
index 144d53dd4401..9fc53924e97b 100644
--- a/unotools/source/config/configmgr.cxx
+++ b/unotools/source/config/configmgr.cxx
@@ -165,7 +165,7 @@ Reference< XMultiServiceFactory > ConfigManager::GetConfigurationProvider()
sMsg += OString(rEx.Message.getStr(),
rEx.Message.getLength(),
RTL_TEXTENCODING_ASCII_US);
- OSL_ENSURE(sal_False, sMsg.getStr());
+ OSL_FAIL(sMsg.getStr());
}
}
#else
@@ -221,7 +221,7 @@ void ConfigManager::RegisterConfigItem(utl::ConfigItem& rCfgItem)
{
ConfigItemListEntry_Impl& rEntry = *aListIter;
if(rEntry.pConfigItem == &rCfgItem)
- OSL_ENSURE(sal_False, "RegisterConfigItem: already inserted!");
+ OSL_FAIL("RegisterConfigItem: already inserted!");
}
#endif
pMgrImpl->aItemList.insert(aListIter, ConfigItemListEntry_Impl(&rCfgItem));
@@ -297,7 +297,7 @@ Reference< XHierarchicalNameAccess> ConfigManager::AcquireTree(utl::ConfigItem&
sMsg += OString(rEx.Message.getStr(),
rEx.Message.getLength(),
RTL_TEXTENCODING_ASCII_US);
- OSL_ENSURE(sal_False, sMsg.getStr());
+ OSL_FAIL(sMsg.getStr());
}
#endif
}
@@ -530,7 +530,7 @@ Any ConfigManager::GetDirectConfigProperty(ConfigProperty eProp)
aBuf.append( "\" under \"" );
aBuf.append( rtl::OUStringToOString( sPath, RTL_TEXTENCODING_ASCII_US ) );
aBuf.append( "\" (caught an exception)!" );
- OSL_ENSURE( sal_False, aBuf.getStr() );
+ OSL_FAIL( aBuf.getStr() );
#endif
}
}
@@ -632,7 +632,7 @@ Reference< XHierarchicalNameAccess> ConfigManager::GetHierarchyAccess(const OUSt
sMsg += OString(rEx.Message.getStr(),
rEx.Message.getLength(),
RTL_TEXTENCODING_ASCII_US);
- OSL_ENSURE(sal_False, sMsg.getStr());
+ OSL_FAIL(sMsg.getStr());
}
#else
catch(Exception&){}
@@ -663,7 +663,7 @@ Any ConfigManager::GetLocalProperty(const OUString& rProperty)
sMsg += OString(rEx.Message.getStr(),
rEx.Message.getLength(),
RTL_TEXTENCODING_ASCII_US);
- OSL_ENSURE(sal_False, sMsg.getStr());
+ OSL_FAIL(sMsg.getStr());
}
#else
catch(Exception&){}
@@ -693,7 +693,7 @@ void ConfigManager::PutLocalProperty(const OUString& rProperty, const Any& rValu
sMsg += OString(rEx.Message.getStr(),
rEx.Message.getLength(),
RTL_TEXTENCODING_ASCII_US);
- OSL_ENSURE(sal_False, sMsg.getStr());
+ OSL_FAIL(sMsg.getStr());
}
#else
catch(Exception& ){}
diff --git a/unotools/source/config/confignode.cxx b/unotools/source/config/confignode.cxx
index 65f7b2b631c9..264eda0f59ce 100644
--- a/unotools/source/config/confignode.cxx
+++ b/unotools/source/config/confignode.cxx
@@ -210,7 +210,7 @@ namespace utl
}
catch(Exception&)
{
- OSL_ENSURE(sal_False, "OConfigurationNode::getNodeNames: caught a generic exception!");
+ OSL_FAIL("OConfigurationNode::getNodeNames: caught a generic exception!");
}
}
@@ -236,16 +236,16 @@ namespace utl
aBuf.append("OConfigurationNode::removeNode: there is no element named!");
aBuf.append( rtl::OUStringToOString( _rName, RTL_TEXTENCODING_ASCII_US ) );
aBuf.append( "!" );
- OSL_ENSURE(sal_False, aBuf.getStr());
+ OSL_FAIL(aBuf.getStr());
#endif
}
catch (WrappedTargetException&)
{
- OSL_ENSURE(sal_False, "OConfigurationNode::removeNode: caught a WrappedTargetException!");
+ OSL_FAIL("OConfigurationNode::removeNode: caught a WrappedTargetException!");
}
catch(Exception&)
{
- OSL_ENSURE(sal_False, "OConfigurationNode::removeNode: caught a generic exception!");
+ OSL_FAIL("OConfigurationNode::removeNode: caught a generic exception!");
}
}
return sal_False;
@@ -316,12 +316,12 @@ namespace utl
if (m_xDirectAccess.is() && m_xDirectAccess->hasByName(sNormalized))
{
if (!::cppu::extractInterface(xNode, m_xDirectAccess->getByName(sNormalized)))
- OSL_ENSURE(sal_False, "OConfigurationNode::openNode: could not open the node!");
+ OSL_FAIL("OConfigurationNode::openNode: could not open the node!");
}
else if (m_xHierarchyAccess.is())
{
if (!::cppu::extractInterface(xNode, m_xHierarchyAccess->getByHierarchicalName(_rPath)))
- OSL_ENSURE(sal_False, "OConfigurationNode::openNode: could not open the node!");
+ OSL_FAIL("OConfigurationNode::openNode: could not open the node!");
}
if (xNode.is())
return OConfigurationNode( xNode );
@@ -334,12 +334,12 @@ namespace utl
aBuf.append("OConfigurationNode::openNode: there is no element named ");
aBuf.append( rtl::OUStringToOString( _rPath, RTL_TEXTENCODING_ASCII_US ) );
aBuf.append("!");
- OSL_ENSURE(sal_False, aBuf.getStr());
+ OSL_FAIL(aBuf.getStr());
#endif
}
catch(Exception&)
{
- OSL_ENSURE(sal_False, "OConfigurationNode::openNode: caught an exception while retrieving the node!");
+ OSL_FAIL("OConfigurationNode::openNode: caught an exception while retrieving the node!");
}
return OConfigurationNode();
}
@@ -437,19 +437,19 @@ namespace utl
}
catch(IllegalArgumentException&)
{
- OSL_ENSURE(sal_False, "OConfigurationNode::setNodeValue: could not replace the value: caught an IllegalArgumentException!");
+ OSL_FAIL("OConfigurationNode::setNodeValue: could not replace the value: caught an IllegalArgumentException!");
}
catch(NoSuchElementException&)
{
- OSL_ENSURE(sal_False, "OConfigurationNode::setNodeValue: could not replace the value: caught a NoSuchElementException!");
+ OSL_FAIL("OConfigurationNode::setNodeValue: could not replace the value: caught a NoSuchElementException!");
}
catch(WrappedTargetException&)
{
- OSL_ENSURE(sal_False, "OConfigurationNode::setNodeValue: could not replace the value: caught a WrappedTargetException!");
+ OSL_FAIL("OConfigurationNode::setNodeValue: could not replace the value: caught a WrappedTargetException!");
}
catch(Exception&)
{
- OSL_ENSURE(sal_False, "OConfigurationNode::setNodeValue: could not replace the value: caught a generic Exception!");
+ OSL_FAIL("OConfigurationNode::setNodeValue: could not replace the value: caught a generic Exception!");
}
diff --git a/unotools/source/config/itemholder1.cxx b/unotools/source/config/itemholder1.cxx
index 9c162484c7aa..f9a22805dd6d 100644
--- a/unotools/source/config/itemholder1.cxx
+++ b/unotools/source/config/itemholder1.cxx
@@ -104,7 +104,7 @@ ItemHolder1::ItemHolder1()
sMsg += ::rtl::OString(rEx.Message.getStr(),
rEx.Message.getLength(),
RTL_TEXTENCODING_ASCII_US);
- OSL_ENSURE(sal_False, sMsg.getStr());
+ OSL_FAIL(sMsg.getStr());
}
}
#else
diff --git a/unotools/source/config/moduleoptions.cxx b/unotools/source/config/moduleoptions.cxx
index 56da35f59f26..4edb4fb0968e 100644
--- a/unotools/source/config/moduleoptions.cxx
+++ b/unotools/source/config/moduleoptions.cxx
@@ -478,7 +478,7 @@ SvtModuleOptions_Impl::~SvtModuleOptions_Impl()
*//*-*************************************************************************************************************/
void SvtModuleOptions_Impl::Notify( const css::uno::Sequence< ::rtl::OUString >& )
{
- OSL_ENSURE( sal_False, "SvtModuleOptions_Impl::Notify()\nNot implemented yet!\n" );
+ OSL_FAIL( "SvtModuleOptions_Impl::Notify()\nNot implemented yet!\n" );
}
/*-****************************************************************************************************//**
diff --git a/unotools/source/config/viewoptions.cxx b/unotools/source/config/viewoptions.cxx
index f622b8d893a4..c0eecd9e7edd 100644
--- a/unotools/source/config/viewoptions.cxx
+++ b/unotools/source/config/viewoptions.cxx
@@ -859,7 +859,7 @@ SvtViewOptions::SvtViewOptions( EViewType eType ,
}
}
break;
- default : OSL_ENSURE( sal_False, "SvtViewOptions::SvtViewOptions()\nThese view type is unknown! All following calls at these instance will do nothing!\n" );
+ default : OSL_FAIL( "SvtViewOptions::SvtViewOptions()\nThese view type is unknown! All following calls at these instance will do nothing!\n" );
}
}
diff --git a/unotools/source/misc/desktopterminationobserver.cxx b/unotools/source/misc/desktopterminationobserver.cxx
index 064855a3c4f3..b9f457792dde 100644
--- a/unotools/source/misc/desktopterminationobserver.cxx
+++ b/unotools/source/misc/desktopterminationobserver.cxx
@@ -123,7 +123,7 @@ namespace utl
}
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "OObserverImpl::ensureObservation: caught an exception!" );
+ OSL_FAIL( "OObserverImpl::ensureObservation: caught an exception!" );
}
}
diff --git a/unotools/source/misc/eventlisteneradapter.cxx b/unotools/source/misc/eventlisteneradapter.cxx
index fe555d906347..4ee8c8430027 100644
--- a/unotools/source/misc/eventlisteneradapter.cxx
+++ b/unotools/source/misc/eventlisteneradapter.cxx
@@ -169,7 +169,7 @@ namespace utl
{
if (!_rxComp.is())
{
- OSL_ENSURE(sal_False, "OEventListenerAdapter::startComponentListening: invalid component!");
+ OSL_FAIL("OEventListenerAdapter::startComponentListening: invalid component!");
return;
}
diff --git a/unotools/source/misc/sharedunocomponent.cxx b/unotools/source/misc/sharedunocomponent.cxx
index 62461bd2d480..8da98aa34954 100644
--- a/unotools/source/misc/sharedunocomponent.cxx
+++ b/unotools/source/misc/sharedunocomponent.cxx
@@ -71,7 +71,7 @@ namespace utl
}
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "DisposableComponent::~DisposableComponent: caught an exception!" );
+ OSL_FAIL( "DisposableComponent::~DisposableComponent: caught an exception!" );
}
m_xComponent.clear();
}
@@ -157,7 +157,7 @@ namespace utl
catch( const CloseVetoException& ) { /* fine */ }
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "CloseableComponentImpl::nf_closeComponent: caught an unexpected exception!" );
+ OSL_FAIL( "CloseableComponentImpl::nf_closeComponent: caught an unexpected exception!" );
}
// reset
@@ -179,7 +179,7 @@ namespace utl
}
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "CloseableComponentImpl::impl_nf_switchListening: caught an exception!" );
+ OSL_FAIL( "CloseableComponentImpl::impl_nf_switchListening: caught an exception!" );
}
}
diff --git a/unotools/source/ucbhelper/ucbhelper.cxx b/unotools/source/ucbhelper/ucbhelper.cxx
index 76fc443fb8ae..513a8e0672ce 100644
--- a/unotools/source/ucbhelper/ucbhelper.cxx
+++ b/unotools/source/ucbhelper/ucbhelper.cxx
@@ -914,7 +914,7 @@ sal_Bool UCBContentHelper::EqualURLs( const ::rtl::OUString& aFirstURL, const ::
}
catch( uno::Exception& )
{
- OSL_ENSURE( sal_False, "Can't compare URL's, treat as different!\n" );
+ OSL_FAIL( "Can't compare URL's, treat as different!\n" );
}
}
}