summaryrefslogtreecommitdiff
path: root/cppuhelper
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2011-03-12 12:10:42 +0100
committerThomas Arnhold <thomas@arnhold.org>2011-03-12 14:19:48 +0100
commitadc6fe00e3ef3cca5bbd49a4633181856bf111df (patch)
treeea50caa8979aa23d77f912bee478d968ccf18232 /cppuhelper
parent629b05ac304a47f70180d044ac5db18a9ecfc9cc (diff)
Move OSL_ENSURE(0,...) to OSL_FAIL(...)
Diffstat (limited to 'cppuhelper')
-rw-r--r--cppuhelper/source/bootstrap.cxx2
-rw-r--r--cppuhelper/source/component.cxx2
-rw-r--r--cppuhelper/source/component_context.cxx2
-rw-r--r--cppuhelper/source/exc_thrower.cxx2
-rw-r--r--cppuhelper/source/factory.cxx2
-rw-r--r--cppuhelper/source/implbase_ex.cxx6
6 files changed, 8 insertions, 8 deletions
diff --git a/cppuhelper/source/bootstrap.cxx b/cppuhelper/source/bootstrap.cxx
index 6cbe33274fbb..54e1e7e70dfe 100644
--- a/cppuhelper/source/bootstrap.cxx
+++ b/cppuhelper/source/bootstrap.cxx
@@ -173,7 +173,7 @@ void addFactories(
buf.append( ppNames[ -2 ] );
buf.append( "\"!!!" );
OString str( buf.makeStringAndClear() );
- OSL_ENSURE( 0, str.getStr() );
+ OSL_FAIL( str.getStr() );
}
#endif
}
diff --git a/cppuhelper/source/component.cxx b/cppuhelper/source/component.cxx
index ffafbe5bcbeb..c74d3894e642 100644
--- a/cppuhelper/source/component.cxx
+++ b/cppuhelper/source/component.cxx
@@ -106,7 +106,7 @@ void OComponentHelper::release() throw()
// release should not throw exceptions
#if OSL_DEBUG_LEVEL > 0
OString msg( OUStringToOString( exc.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, msg.getStr() );
+ OSL_FAIL( msg.getStr() );
#else
(void) exc; // avoid warning about unused variable
#endif
diff --git a/cppuhelper/source/component_context.cxx b/cppuhelper/source/component_context.cxx
index 74a6f9b2e305..43213349366b 100644
--- a/cppuhelper/source/component_context.cxx
+++ b/cppuhelper/source/component_context.cxx
@@ -851,7 +851,7 @@ extern "C" { static void s_createComponentContext_v(va_list * pParam)
catch (Exception & exc)
{
(void) exc; // avoid warning about unused variable
- OSL_ENSURE( 0, OUStringToOString(
+ OSL_FAIL( OUStringToOString(
exc.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
xContext.clear();
}
diff --git a/cppuhelper/source/exc_thrower.cxx b/cppuhelper/source/exc_thrower.cxx
index 234e57569a73..7e635e67ce6e 100644
--- a/cppuhelper/source/exc_thrower.cxx
+++ b/cppuhelper/source/exc_thrower.cxx
@@ -170,7 +170,7 @@ void ExceptionThrower::release() throw ()
//______________________________________________________________________________
void ExceptionThrower::throwException( Any const & exc ) throw (Exception)
{
- OSL_ENSURE( 0, "unexpected!" );
+ OSL_FAIL( "unexpected!" );
throwException( exc );
}
diff --git a/cppuhelper/source/factory.cxx b/cppuhelper/source/factory.cxx
index 4e34b470e608..af2df37e79e1 100644
--- a/cppuhelper/source/factory.cxx
+++ b/cppuhelper/source/factory.cxx
@@ -691,7 +691,7 @@ sal_Bool ORegistryFactoryHelper::convertFastPropertyValue(
Any &, Any &, sal_Int32, Any const & )
throw (lang::IllegalArgumentException)
{
- OSL_ENSURE( 0, "unexpected!" );
+ OSL_FAIL( "unexpected!" );
return false;
}
diff --git a/cppuhelper/source/implbase_ex.cxx b/cppuhelper/source/implbase_ex.cxx
index fdd5ab9665bd..0e2c12bd4d51 100644
--- a/cppuhelper/source/implbase_ex.cxx
+++ b/cppuhelper/source/implbase_ex.cxx
@@ -66,7 +66,7 @@ static inline void checkInterface( Type const & rType )
OUString msg( buf.makeStringAndClear() );
#if OSL_DEBUG_LEVEL > 0
OString str( OUStringToOString( msg, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, str.getStr() );
+ OSL_FAIL( str.getStr() );
#endif
throw RuntimeException( msg, Reference< XInterface >() );
}
@@ -116,7 +116,7 @@ static inline type_entry * __getTypeEntries( class_data * cd )
OUString msg( buf.makeStringAndClear() );
#if OSL_DEBUG_LEVEL > 0
OString str( OUStringToOString( msg, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, str.getStr() );
+ OSL_FAIL( str.getStr() );
#endif
throw RuntimeException( msg, Reference< XInterface >() );
}
@@ -229,7 +229,7 @@ static inline void * __queryDeepNoXInterface(
OUString msg( buf.makeStringAndClear() );
#if OSL_DEBUG_LEVEL > 0
OString str( OUStringToOString( msg, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, str.getStr() );
+ OSL_FAIL( str.getStr() );
#endif
throw RuntimeException( msg, Reference< XInterface >() );
}