From cab402a8aa21c2ba6d2d66d45d44b3b2b07cedf8 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 3 Dec 2009 14:12:42 +0100 Subject: diagnostics --- unotools/source/config/confignode.cxx | 37 ++++++++++------------------------- 1 file changed, 10 insertions(+), 27 deletions(-) (limited to 'unotools') diff --git a/unotools/source/config/confignode.cxx b/unotools/source/config/confignode.cxx index 56d258461e95..c8134137db0c 100644 --- a/unotools/source/config/confignode.cxx +++ b/unotools/source/config/confignode.cxx @@ -468,16 +468,9 @@ namespace utl aReturn = m_xHierarchyAccess->getByHierarchicalName(_rPath); } } - catch(NoSuchElementException& e) + catch(const NoSuchElementException&) { - #if OSL_DEBUG_LEVEL > 0 - rtl::OStringBuffer aBuf( 256 ); - aBuf.append("OConfigurationNode::getNodeValue: caught a NoSuchElementException while trying to open "); - aBuf.append( rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ) ); - OSL_ENSURE(sal_False, aBuf.getStr()); - #else - (void)e; - #endif + DBG_UNHANDLED_EXCEPTION(); } return aReturn; } @@ -500,7 +493,7 @@ namespace utl } catch(Exception&) { - OSL_ENSURE(sal_False, "OConfigurationNode::cloneAsRoot: could not retrieve the node path!"); + DBG_UNHANDLED_EXCEPTION(); } } @@ -561,13 +554,9 @@ namespace utl m_xCommitter->commitChanges(); return sal_True; } - catch(WrappedTargetException&) - { - OSL_ENSURE(sal_False, "OConfigurationTreeRoot::commit: caught a WrappedTargetException!"); - } - catch(RuntimeException&) + catch(const Exception&) { - OSL_ENSURE(sal_False, "OConfigurationTreeRoot::commit: caught a RuntimeException!"); + DBG_UNHANDLED_EXCEPTION(); } return sal_False; } @@ -604,7 +593,7 @@ namespace utl } catch(const Exception&) { - OSL_ENSURE(sal_False, "OConfigurationTreeRoot::createWithProvider: unable to check the service conformance of the provider given!"); + DBG_UNHANDLED_EXCEPTION(); } } #endif @@ -648,15 +637,9 @@ namespace utl try { xComp->dispose(); } catch(Exception&) { } } } - catch(Exception& e) + catch(const Exception&) { - #if OSL_DEBUG_LEVEL > 0 - ::rtl::OString sMessage( "OConfigurationTreeRoot::createWithProvider: caught an exception while creating the access object!\nmessage:\n" ); - sMessage += ::rtl::OString( e.Message.getStr(), e.Message.getLength(), RTL_TEXTENCODING_ASCII_US ); - OSL_ENSURE( sal_False, sMessage.getStr() ); - #else - (void)e; - #endif + DBG_UNHANDLED_EXCEPTION(); } } bTryAgain = CM_PREFER_UPDATABLE == _eMode; @@ -683,9 +666,9 @@ namespace utl if (xProviderAsFac.is()) return createWithProvider(xProviderAsFac, _rPath, _nDepth, _eMode, _bLazyWrite); } - catch(Exception&) + catch(const Exception&) { - OSL_ENSURE(sal_False, "OConfigurationTreeRoot::createWithServiceFactory: error while instantiating the provider service!"); + DBG_UNHANDLED_EXCEPTION(); } } return OConfigurationTreeRoot(); -- cgit