From 4363d620076d3624d96bdde5ad72d88065858071 Mon Sep 17 00:00:00 2001 From: Thomas Arnhold Date: Sat, 12 Mar 2011 14:27:45 +0100 Subject: Move OSL_ENSURE(false,...) to OSL_FAIL(...) --- scripting/source/inc/util/MiscUtils.hxx | 4 ++-- scripting/source/provider/BrowseNodeFactoryImpl.cxx | 2 +- scripting/source/provider/URIHelper.cxx | 6 ++---- scripting/source/stringresource/stringresource.cxx | 10 +++++----- 4 files changed, 10 insertions(+), 12 deletions(-) (limited to 'scripting') diff --git a/scripting/source/inc/util/MiscUtils.hxx b/scripting/source/inc/util/MiscUtils.hxx index ddedb48cfe..3ddf351efb 100644 --- a/scripting/source/inc/util/MiscUtils.hxx +++ b/scripting/source/inc/util/MiscUtils.hxx @@ -115,11 +115,11 @@ public: } catch ( css::lang::IllegalArgumentException const & ) { - OSL_ENSURE( false, "Invalid document model!" ); + OSL_FAIL( "Invalid document model!" ); } } - OSL_ENSURE( false, "Unable to obtain URL for document model!" ); + OSL_FAIL( "Unable to obtain URL for document model!" ); return rtl::OUString(); } static css::uno::Reference< css::frame::XModel > tDocUrlToModel( const ::rtl::OUString& url ) diff --git a/scripting/source/provider/BrowseNodeFactoryImpl.cxx b/scripting/source/provider/BrowseNodeFactoryImpl.cxx index 198a71a05f..860d4e9aa1 100644 --- a/scripting/source/provider/BrowseNodeFactoryImpl.cxx +++ b/scripting/source/provider/BrowseNodeFactoryImpl.cxx @@ -418,7 +418,7 @@ public: } catch( uno::Exception& ) { - OSL_ENSURE( false, "DefaultBrowseNode::DefaultBrowseNode: Caught exception!" ); + OSL_FAIL( "DefaultBrowseNode::DefaultBrowseNode: Caught exception!" ); } OSL_ENSURE( m_xAggProxy.is(), "DefaultBrowseNode::DefaultBrowseNode: Wrapped BrowseNode cannot be aggregated!" ); diff --git a/scripting/source/provider/URIHelper.cxx b/scripting/source/provider/URIHelper.cxx index 0d3a6a998b..5b90bb8790 100644 --- a/scripting/source/provider/URIHelper.cxx +++ b/scripting/source/provider/URIHelper.cxx @@ -78,8 +78,7 @@ ScriptingFrameworkURIHelper::ScriptingFrameworkURIHelper( } catch (uno::Exception&) { - OSL_ENSURE(false, - "Scripting Framework error initialising XSimpleFileAccess"); + OSL_FAIL("Scripting Framework error initialising XSimpleFileAccess"); } try @@ -92,8 +91,7 @@ ScriptingFrameworkURIHelper::ScriptingFrameworkURIHelper( } catch (uno::Exception&) { - OSL_ENSURE(false, - "Scripting Framework error initialising XUriReferenceFactory"); + OSL_FAIL("Scripting Framework error initialising XUriReferenceFactory"); } } diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx index df355d5520..dcfabe5556 100644 --- a/scripting/source/stringresource/stringresource.cxx +++ b/scripting/source/stringresource/stringresource.cxx @@ -1558,7 +1558,7 @@ Reference< io::XInputStream > BinaryInput::getInputStreamForSection( sal_Int32 n } } else - OSL_ENSURE( false, "BinaryInput::getInputStreamForSection(): Read past end" ); + OSL_FAIL( "BinaryInput::getInputStreamForSection(): Read past end" ); return xIn; } @@ -1568,7 +1568,7 @@ void BinaryInput::seek( sal_Int32 nPos ) if( nPos <= m_nSize ) m_nCurPos = nPos; else - OSL_ENSURE( false, "BinaryInput::seek(): Position past end" ); + OSL_FAIL( "BinaryInput::seek(): Position past end" ); } @@ -1581,7 +1581,7 @@ sal_Int16 BinaryInput::readInt16( void ) nRet += 256 * sal_Int16( sal_uInt8( m_pData[m_nCurPos++] ) ); } else - OSL_ENSURE( false, "BinaryInput::readInt16(): Read past end" ); + OSL_FAIL( "BinaryInput::readInt16(): Read past end" ); return nRet; } @@ -1599,7 +1599,7 @@ sal_Int32 BinaryInput::readInt32( void ) } } else - OSL_ENSURE( false, "BinaryInput::readInt32(): Read past end" ); + OSL_FAIL( "BinaryInput::readInt32(): Read past end" ); return nRet; } @@ -1613,7 +1613,7 @@ sal_Unicode BinaryInput::readUnicodeChar( void ) nRet += 256 * sal_uInt8( m_pData[m_nCurPos++] ); } else - OSL_ENSURE( false, "BinaryInput::readUnicodeChar(): Read past end" ); + OSL_FAIL( "BinaryInput::readUnicodeChar(): Read past end" ); sal_Unicode cRet = nRet; return cRet; -- cgit v1.2.3