[Libreoffice-commits] .: 5 commits - bridges/inc bridges/source cli_ure/source cppuhelper/source cppu/source io/test jvmaccess/source jvmfwk/plugins jvmfwk/source remotebridges/source sal/cpprt sal/osl sal/qa stoc/source stoc/test

Thomas Arnhold tarnhold at kemper.freedesktop.org
Sun Mar 13 08:53:44 PDT 2011


 bridges/inc/bridges/cpp_uno/bridge.hxx               |    2 -
 bridges/source/cpp_uno/cc50_solaris_intel/except.cxx |    2 -
 bridges/source/cpp_uno/cc50_solaris_sparc/except.cxx |    2 -
 bridges/source/cpp_uno/gcc3_linux_arm/except.cxx     |    4 +-
 bridges/source/cpp_uno/gcc3_linux_hppa/except.cxx    |    4 +-
 bridges/source/cpp_uno/gcc3_linux_intel/except.cxx   |    4 +-
 bridges/source/cpp_uno/gcc3_linux_m68k/except.cxx    |    4 +-
 bridges/source/cpp_uno/gcc3_linux_mips/except.cxx    |    4 +-
 bridges/source/cpp_uno/gcc3_linux_sparc/except.cxx   |    4 +-
 bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx  |    4 +-
 bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx  |    4 +-
 bridges/source/cpp_uno/gcc3_os2_intel/except.cxx     |    4 +-
 bridges/source/cpp_uno/gcc3_solaris_intel/except.cxx |    4 +-
 bridges/source/cpp_uno/gcc3_solaris_sparc/except.cxx |    4 +-
 bridges/source/cpp_uno/mingw_intel/except.cxx        |    4 +-
 bridges/source/cpp_uno/shared/component.cxx          |    4 +-
 bridges/source/jni_uno/jni_base.h                    |    2 -
 bridges/source/jni_uno/jni_bridge.cxx                |   15 +++------
 bridges/source/jni_uno/jni_java2uno.cxx              |   10 +++---
 bridges/source/jni_uno/jni_uno2java.cxx              |   15 ++++-----
 bridges/source/remote/urp/urp_environment.cxx        |    2 -
 bridges/source/remote/urp/urp_propertyobject.cxx     |    8 ++--
 bridges/source/remote/urp/urp_reader.cxx             |   31 +++++++++----------
 cli_ure/source/climaker/climaker_app.cxx             |    6 +--
 cli_ure/source/uno_bridge/cli_bridge.cxx             |    6 +--
 cli_ure/source/uno_bridge/cli_proxy.cxx              |   14 ++++----
 cppu/source/typelib/typelib.cxx                      |    8 ++--
 cppu/source/uno/copy.hxx                             |    4 +-
 cppu/source/uno/data.cxx                             |    2 -
 cppu/source/uno/destr.hxx                            |    4 +-
 cppu/source/uno/sequence.cxx                         |    4 +-
 cppuhelper/source/bootstrap.cxx                      |    2 -
 cppuhelper/source/component.cxx                      |    2 -
 cppuhelper/source/component_context.cxx              |    2 -
 cppuhelper/source/exc_thrower.cxx                    |    2 -
 cppuhelper/source/factory.cxx                        |    2 -
 cppuhelper/source/implbase.cxx                       |    8 ++--
 cppuhelper/source/implbase_ex.cxx                    |    6 +--
 cppuhelper/source/propshlp.cxx                       |    2 -
 cppuhelper/source/weak.cxx                           |    4 +-
 io/test/testconnection.cxx                           |   16 ++++-----
 jvmaccess/source/virtualmachine.cxx                  |    4 +-
 jvmfwk/plugins/sunmajor/pluginlib/util.cxx           |    2 -
 jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx     |    2 -
 jvmfwk/source/framework.cxx                          |   30 +++++++++---------
 jvmfwk/source/fwkbase.cxx                            |    2 -
 remotebridges/source/factory/bridgefactory.cxx       |    2 -
 sal/cpprt/operators_new_delete.cxx                   |    2 -
 sal/osl/os2/file.cxx                                 |    2 -
 sal/osl/os2/file_url.cxx                             |    2 -
 sal/osl/os2/socket.c                                 |    2 -
 sal/osl/unx/file_url.cxx                             |    8 ++--
 sal/osl/unx/socket.c                                 |    2 -
 sal/osl/w32/file_dirvol.cxx                          |    2 -
 sal/osl/w32/file_error.c                             |    2 -
 sal/qa/osl/socket/sockethelper.cxx                   |    2 -
 stoc/source/corereflection/crefl.cxx                 |    4 +-
 stoc/source/corereflection/lrucache.hxx              |    6 +--
 stoc/source/implementationregistration/implreg.cxx   |    2 -
 stoc/source/javavm/javavm.cxx                        |   11 +++---
 stoc/source/loader/dllcomponentloader.cxx            |    2 -
 stoc/source/security/access_controller.cxx           |   10 +++---
 stoc/source/security/lru_cache.h                     |    6 +--
 stoc/source/security/permissions.cxx                 |    4 +-
 stoc/source/servicemanager/servicemanager.cxx        |    2 -
 stoc/source/tdmanager/lrucache.hxx                   |    6 +--
 stoc/test/javavm/testjavavm.cxx                      |    4 +-
 stoc/test/testconv.cxx                               |    2 -
 stoc/test/testcorefl.cxx                             |    2 -
 stoc/test/testintrosp.cxx                            |    2 -
 70 files changed, 179 insertions(+), 185 deletions(-)

New commits:
commit c9e98512f3bb5b86e5c7d22a961ec8f76feb508f
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Sat Mar 12 12:51:35 2011 +0100

    OSL_TRACE: Use format string

diff --git a/bridges/source/jni_uno/jni_java2uno.cxx b/bridges/source/jni_uno/jni_java2uno.cxx
index 9196afb..d473b08 100644
--- a/bridges/source/jni_uno/jni_java2uno.cxx
+++ b/bridges/source/jni_uno/jni_java2uno.cxx
@@ -118,7 +118,7 @@ void Bridge::handle_uno_exc( JNI_context const & jni, uno_Any * uno_exc ) const
         OString cstr_msg(
             OUStringToOString(
                 buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US ) );
-        OSL_TRACE( cstr_msg.getStr() );
+        OSL_TRACE( "%s", cstr_msg.getStr() );
         }
 #endif
         // signal exception
@@ -422,7 +422,7 @@ JNICALL Java_com_sun_star_bridges_jni_1uno_JNI_1proxy_dispatch_1call(
         OString cstr_msg(
             OUStringToOString(
                 trace_buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US ) );
-        OSL_TRACE( cstr_msg.getStr() );
+        OSL_TRACE( "%s", cstr_msg.getStr() );
         }
 #endif
 
@@ -688,7 +688,7 @@ JNICALL Java_com_sun_star_bridges_jni_1uno_JNI_1proxy_finalize__J(
         OUStringToOString( 
             OUSTR("freeing java uno proxy: ") + oid,
             RTL_TEXTENCODING_ASCII_US ) );
-    OSL_TRACE( cstr_msg.getStr() );
+    OSL_TRACE( "%s", cstr_msg.getStr() );
     }
 #endif
     // revoke from uno env; has already been revoked from java env
diff --git a/bridges/source/jni_uno/jni_uno2java.cxx b/bridges/source/jni_uno/jni_uno2java.cxx
index 0c5fa4e..28a57e2 100644
--- a/bridges/source/jni_uno/jni_uno2java.cxx
+++ b/bridges/source/jni_uno/jni_uno2java.cxx
@@ -135,7 +135,7 @@ void Bridge::handle_java_exc(
     OString cstr_trace(
         OUStringToOString(
             trace_buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US ) );
-    OSL_TRACE( cstr_trace.getStr() );
+    OSL_TRACE( "%s", cstr_trace.getStr() );
 #endif
 }
 
@@ -261,7 +261,7 @@ void Bridge::call_java(
     OString cstr_trace(
         OUStringToOString(
             trace_buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US ) );
-    OSL_TRACE( cstr_trace.getStr() );
+    OSL_TRACE( "%s", cstr_trace.getStr() );
 #endif
 
     // complex return value
@@ -558,7 +558,7 @@ void SAL_CALL UNO_proxy_free( uno_ExtEnvironment * env, void * proxy )
         OUStringToOString( 
             OUSTR("freeing binary uno proxy: ") + that->m_oid,
             RTL_TEXTENCODING_ASCII_US ) );
-    OSL_TRACE( cstr_msg.getStr() );
+    OSL_TRACE( "%s", cstr_msg.getStr() );
 #endif
 
     try
@@ -628,7 +628,7 @@ void SAL_CALL UNO_proxy_dispatch(
     OString cstr_msg(
         OUStringToOString(
             trace_buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US ) );
-    OSL_TRACE( cstr_msg.getStr() );
+    OSL_TRACE( "%s", cstr_msg.getStr() );
 #endif
 
     try
diff --git a/stoc/source/corereflection/crefl.cxx b/stoc/source/corereflection/crefl.cxx
index 3f9555c..6c4f262 100644
--- a/stoc/source/corereflection/crefl.cxx
+++ b/stoc/source/corereflection/crefl.cxx
@@ -276,7 +276,7 @@ inline Reference< XIdlClass > IdlReflectionServiceImpl::constructClass(
 #if OSL_DEBUG_LEVEL > 1
         OSL_TRACE( "### corereflection type unsupported: " );
         OString aName( OUStringToOString( pTypeDescr->pTypeName, RTL_TEXTENCODING_ASCII_US ) );
-        OSL_TRACE( aName.getStr() );
+        OSL_TRACE( "%s", aName.getStr() );
         OSL_TRACE( "\n" );
 #endif
         return Reference< XIdlClass >();
diff --git a/stoc/source/corereflection/lrucache.hxx b/stoc/source/corereflection/lrucache.hxx
index c6ce1c8..5fe3c62 100644
--- a/stoc/source/corereflection/lrucache.hxx
+++ b/stoc/source/corereflection/lrucache.hxx
@@ -166,7 +166,7 @@ inline t_Val LRU_Cache< t_Key, t_Val, t_KeyHash, t_KeyEqual >::getValue( const t
         toFront( pEntry );
 #ifdef __CACHE_DIAGNOSE
         OSL_TRACE( "> retrieved element \"" );
-        OSL_TRACE( ::rtl::OUStringToOString( pEntry->aKey, RTL_TEXTENCODING_ASCII_US ).getStr() );
+        OSL_TRACE( "%s", ::rtl::OUStringToOString( pEntry->aKey, RTL_TEXTENCODING_ASCII_US ).getStr() );
         OSL_TRACE( "\" from cache <\n" );
 #endif
         return pEntry->aVal;
@@ -191,7 +191,7 @@ inline void LRU_Cache< t_Key, t_Val, t_KeyHash, t_KeyEqual >::setValue(
             if (pEntry->aKey.getLength())
             {
                 OSL_TRACE( "> kicking element \"" );
-                OSL_TRACE( ::rtl::OUStringToOString( pEntry->aKey, RTL_TEXTENCODING_ASCII_US ).getStr() );
+                OSL_TRACE( "%s", ::rtl::OUStringToOString( pEntry->aKey, RTL_TEXTENCODING_ASCII_US ).getStr() );
                 OSL_TRACE( "\" from cache <\n" );
             }
 #endif
@@ -203,7 +203,7 @@ inline void LRU_Cache< t_Key, t_Val, t_KeyHash, t_KeyEqual >::setValue(
             pEntry = (*iFind).second;
 #ifdef __CACHE_DIAGNOSE
             OSL_TRACE( "> replacing element \"" );
-            OSL_TRACE( ::rtl::OUStringToOString( pEntry->aKey, RTL_TEXTENCODING_ASCII_US ).getStr() );
+            OSL_TRACE( "%s", ::rtl::OUStringToOString( pEntry->aKey, RTL_TEXTENCODING_ASCII_US ).getStr() );
             OSL_TRACE( "\" in cache <\n" );
 #endif
         }
diff --git a/stoc/source/security/access_controller.cxx b/stoc/source/security/access_controller.cxx
index 7350c4a..405546c 100644
--- a/stoc/source/security/access_controller.cxx
+++ b/stoc/source/security/access_controller.cxx
@@ -616,13 +616,13 @@ static void dumpPermissions(
             RTL_CONSTASCII_STRINGPARAM("> dumping default permissions:") );
     }
     OString str( ::rtl::OUStringToOString( buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US ) );
-    OSL_TRACE( str.getStr() );
+    OSL_TRACE( "%s", str.getStr() );
     Sequence< OUString > permissions( collection.toStrings() );
     OUString const * p = permissions.getConstArray();
     for ( sal_Int32 nPos = 0; nPos < permissions.getLength(); ++nPos )
     {
         OString str( ::rtl::OUStringToOString( p[ nPos ], RTL_TEXTENCODING_ASCII_US ) );
-        OSL_TRACE( str.getStr() );
+        OSL_TRACE( "%s", str.getStr() );
     }
     OSL_TRACE( "> permission dump done" );
 }
@@ -764,7 +764,7 @@ PermissionCollection AccessController::getEffectivePermissions(
         buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("\"") );
         OString str(
             ::rtl::OUStringToOString( buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US ) );
-        OSL_TRACE( str.getStr() );
+        OSL_TRACE( "%s", str.getStr() );
 #endif
         return PermissionCollection( new AllPermission() );
     }
diff --git a/stoc/source/security/lru_cache.h b/stoc/source/security/lru_cache.h
index d3db8a9..c259a4a 100644
--- a/stoc/source/security/lru_cache.h
+++ b/stoc/source/security/lru_cache.h
@@ -203,7 +203,7 @@ inline t_val const * lru_cache< t_key, t_val, t_hashKey, t_equalKey >::lookup(
             buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("\" from cache") );
             ::rtl::OString str( ::rtl::OUStringToOString(
                 buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US ) );
-            OSL_TRACE( str.getStr() );
+            OSL_TRACE( "%s", str.getStr() );
 #endif
             return &entry->m_val;
         }
@@ -232,7 +232,7 @@ inline void lru_cache< t_key, t_val, t_hashKey, t_equalKey >::set(
                 buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("\" from cache") );
                 ::rtl::OString str( ::rtl::OUStringToOString(
                     buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US ) );
-                OSL_TRACE( str.getStr() );
+                OSL_TRACE( "%s", str.getStr() );
             }
 #endif
             m_key2element.erase( entry->m_key );
@@ -253,7 +253,7 @@ inline void lru_cache< t_key, t_val, t_hashKey, t_equalKey >::set(
             buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("\" in cache") );
             ::rtl::OString str( ::rtl::OUStringToOString(
                 buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US ) );
-            OSL_TRACE( str.getStr() );
+            OSL_TRACE( "%s", str.getStr() );
 #endif
         }
         entry->m_val = val;
diff --git a/stoc/source/security/permissions.cxx b/stoc/source/security/permissions.cxx
index 6687dcb..dfc43f7 100644
--- a/stoc/source/security/permissions.cxx
+++ b/stoc/source/security/permissions.cxx
@@ -89,7 +89,7 @@ static inline sal_Int32 makeMask(
             buf.append( item );
             ::rtl::OString str( ::rtl::OUStringToOString(
                 buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US ) );
-            OSL_TRACE( str.getStr() );
+            OSL_TRACE( "%s", str.getStr() );
         }
 #endif
     }
@@ -580,7 +580,7 @@ static void demanded_diag(
     buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(" => ok.") );
     ::rtl::OString str(
         ::rtl::OUStringToOString( buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US ) );
-    OSL_TRACE( str.getStr() );
+    OSL_TRACE( "%s", str.getStr() );
 }
 #endif
 //--------------------------------------------------------------------------------------------------
diff --git a/stoc/source/tdmanager/lrucache.hxx b/stoc/source/tdmanager/lrucache.hxx
index 5449905..33f04f4 100644
--- a/stoc/source/tdmanager/lrucache.hxx
+++ b/stoc/source/tdmanager/lrucache.hxx
@@ -170,7 +170,7 @@ inline t_Val LRU_Cache< t_Key, t_Val, t_KeyHash, t_KeyEqual >::getValue(
         toFront( pEntry );
 #ifdef __CACHE_DIAGNOSE
         OSL_TRACE( "> retrieved element \"" );
-        OSL_TRACE( ::rtl::OUStringToOString( pEntry->aKey, RTL_TEXTENCODING_ASCII_US ).getStr() );
+        OSL_TRACE( "%s", ::rtl::OUStringToOString( pEntry->aKey, RTL_TEXTENCODING_ASCII_US ).getStr() );
         OSL_TRACE( "\" from cache <\n" );
 #endif
         return pEntry->aVal;
@@ -195,7 +195,7 @@ inline void LRU_Cache< t_Key, t_Val, t_KeyHash, t_KeyEqual >::setValue(
             if (pEntry->aKey.getLength())
             {
                 OSL_TRACE( "> kicking element \"" );
-                OSL_TRACE( ::rtl::OUStringToOString( pEntry->aKey, RTL_TEXTENCODING_ASCII_US ).getStr() );
+                OSL_TRACE( "%s", ::rtl::OUStringToOString( pEntry->aKey, RTL_TEXTENCODING_ASCII_US ).getStr() );
                 OSL_TRACE( "\" from cache <\n" );
             }
 #endif
@@ -207,7 +207,7 @@ inline void LRU_Cache< t_Key, t_Val, t_KeyHash, t_KeyEqual >::setValue(
             pEntry = (*iFind).second;
 #ifdef __CACHE_DIAGNOSE
             OSL_TRACE( "> replacing element \"" );
-            OSL_TRACE( ::rtl::OUStringToOString( pEntry->aKey, RTL_TEXTENCODING_ASCII_US ).getStr() );
+            OSL_TRACE( "%s", ::rtl::OUStringToOString( pEntry->aKey, RTL_TEXTENCODING_ASCII_US ).getStr() );
             OSL_TRACE( "\" in cache <\n" );
 #endif
         }
diff --git a/stoc/test/javavm/testjavavm.cxx b/stoc/test/javavm/testjavavm.cxx
index d0b2af1..236cd40 100644
--- a/stoc/test/javavm/testjavavm.cxx
+++ b/stoc/test/javavm/testjavavm.cxx
@@ -158,7 +158,7 @@ SAL_IMPLEMENT_MAIN()
         OSL_ENSURE( sal_False, "### exception occurred!" );
         OString aMsg( OUStringToOString( rExc.Message, RTL_TEXTENCODING_ASCII_US ) );
         OSL_TRACE( "### exception occurred: " );
-        OSL_TRACE( aMsg.getStr() );
+        OSL_TRACE( "%s", aMsg.getStr() );
         OSL_TRACE( "\n" );
     }
 
diff --git a/stoc/test/testconv.cxx b/stoc/test/testconv.cxx
index a3d108c..5cbc3dc 100644
--- a/stoc/test/testconv.cxx
+++ b/stoc/test/testconv.cxx
@@ -699,7 +699,7 @@ SAL_IMPLEMENT_MAIN()
         OSL_ENSURE( sal_False, "### exception occurred!" );
         OString aMsg( OUStringToOString( rExc.Message, RTL_TEXTENCODING_ASCII_US ) );
         OSL_TRACE( "### exception occurred: " );
-        OSL_TRACE( aMsg.getStr() );
+        OSL_TRACE( "%s", aMsg.getStr() );
         OSL_TRACE( "\n" );
     }
 
diff --git a/stoc/test/testcorefl.cxx b/stoc/test/testcorefl.cxx
index a2ff243..bd4924b 100644
--- a/stoc/test/testcorefl.cxx
+++ b/stoc/test/testcorefl.cxx
@@ -407,7 +407,7 @@ SAL_IMPLEMENT_MAIN()
         OString aMsg(
             OUStringToOString( rExc.Message, RTL_TEXTENCODING_ASCII_US ) );
         OSL_TRACE( "### exception occurred: " );
-        OSL_TRACE( aMsg.getStr() );
+        OSL_TRACE( "%s", aMsg.getStr() );
         OSL_TRACE( "\n" );
     }
 
diff --git a/stoc/test/testintrosp.cxx b/stoc/test/testintrosp.cxx
index ebc2b27..3a3aa0e 100644
--- a/stoc/test/testintrosp.cxx
+++ b/stoc/test/testintrosp.cxx
@@ -1244,7 +1244,7 @@ SAL_IMPLEMENT_MAIN()
         OSL_ENSURE( sal_False, "### exception occurred!" );
         OString aMsg( OUStringToOString( rExc.Message, RTL_TEXTENCODING_ASCII_US ) );
         OSL_TRACE( "### exception occurred: " );
-        OSL_TRACE( aMsg.getStr() );
+        OSL_TRACE( "%s", aMsg.getStr() );
         OSL_TRACE( "\n" );
     }
 
commit c2627e8a95ffc81498133cb3f26527c8395064b8
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Sat Mar 12 12:14:02 2011 +0100

    Move OSL_ENSURE(0,...) to OSL_FAIL(...)

diff --git a/bridges/source/jni_uno/jni_base.h b/bridges/source/jni_uno/jni_base.h
index 92edbf6..2df9272 100644
--- a/bridges/source/jni_uno/jni_base.h
+++ b/bridges/source/jni_uno/jni_base.h
@@ -127,7 +127,7 @@ inline bool JNI_context::assert_no_exception() const
     if (JNI_FALSE != m_env->ExceptionCheck())
     {
         m_env->ExceptionClear();
-        OSL_ENSURE( 0, "unexpected java exception occurred!" );
+        OSL_FAIL( "unexpected java exception occurred!" );
         return false;
     }
     return true;
diff --git a/sal/osl/os2/socket.c b/sal/osl/os2/socket.c
index b97dde7..fd00d18 100644
--- a/sal/osl/os2/socket.c
+++ b/sal/osl/os2/socket.c
@@ -1605,7 +1605,7 @@ void SAL_CALL osl_releaseSocket( oslSocket pSocket )
 #if defined(LINUX)
     if ( pSocket->m_bIsAccepting == sal_True )
     {
-        OSL_ENSURE(0, "osl_destroySocket : attempt to destroy socket while accepting\n");
+        OSL_FAIL("osl_destroySocket : attempt to destroy socket while accepting\n");
         return;
     }
 #endif /* LINUX */
diff --git a/sal/osl/unx/socket.c b/sal/osl/unx/socket.c
index 91cf066..7409592 100644
--- a/sal/osl/unx/socket.c
+++ b/sal/osl/unx/socket.c
@@ -1656,7 +1656,7 @@ void SAL_CALL osl_releaseSocket( oslSocket pSocket )
 #if defined(LINUX)
     if ( pSocket->m_bIsAccepting == sal_True )
     {
-        OSL_ENSURE(0, "osl_destroySocket : attempt to destroy socket while accepting\n");
+        OSL_FAIL("osl_destroySocket : attempt to destroy socket while accepting\n");
         return;
     }
 #endif /* LINUX */
diff --git a/sal/osl/w32/file_error.c b/sal/osl/w32/file_error.c
index 3d33cdf..45ad7ed 100644
--- a/sal/osl/w32/file_error.c
+++ b/sal/osl/w32/file_error.c
@@ -148,7 +148,7 @@ void _osl_warnFile( const char *message, rtl_uString *ustrFile )
 
         message = szBuffer;
     }
-    OSL_ENSURE( 0, message );
+    OSL_FAIL( message );
 }
 #endif /* OSL_DEBUG_LEVEL */
 
commit ff29e2d893da04490a159f9bc7111199f5e368ff
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Sat Mar 12 12:10:42 2011 +0100

    Move OSL_ENSURE(0,...) to OSL_FAIL(...)

diff --git a/bridges/inc/bridges/cpp_uno/bridge.hxx b/bridges/inc/bridges/cpp_uno/bridge.hxx
index d5cc2b9..b4e4718 100644
--- a/bridges/inc/bridges/cpp_uno/bridge.hxx
+++ b/bridges/inc/bridges/cpp_uno/bridge.hxx
@@ -466,7 +466,7 @@ inline void SAL_CALL cppu_cppenv_computeObjectIdentifier(
         }
         catch (::com::sun::star::uno::RuntimeException &)
         {
-            OSL_ENSURE( 0, "### RuntimeException occurred udring queryInterface()!" );
+            OSL_FAIL( "### RuntimeException occurred udring queryInterface()!" );
         }
     }
 }
diff --git a/bridges/source/cpp_uno/cc50_solaris_intel/except.cxx b/bridges/source/cpp_uno/cc50_solaris_intel/except.cxx
index 8d8f20d..6945636 100644
--- a/bridges/source/cpp_uno/cc50_solaris_intel/except.cxx
+++ b/bridges/source/cpp_uno/cc50_solaris_intel/except.cxx
@@ -432,7 +432,7 @@ void cc50_solaris_intel_fillUnoException(
 #if OSL_DEBUG_LEVEL > 0
         OString cstr( OUStringToOString(
                           aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
-        OSL_ENSURE( 0, cstr.getStr() );
+        OSL_FAIL( cstr.getStr() );
 #endif
         return;
     }
diff --git a/bridges/source/cpp_uno/cc50_solaris_sparc/except.cxx b/bridges/source/cpp_uno/cc50_solaris_sparc/except.cxx
index 756dc6b..e8a1772 100644
--- a/bridges/source/cpp_uno/cc50_solaris_sparc/except.cxx
+++ b/bridges/source/cpp_uno/cc50_solaris_sparc/except.cxx
@@ -426,7 +426,7 @@ void cc50_solaris_sparc_fillUnoException(
 #if OSL_DEBUG_LEVEL > 0
         OString cstr( OUStringToOString(
                           aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
-        OSL_ENSURE( 0, cstr.getStr() );
+        OSL_FAIL( cstr.getStr() );
 #endif
         return;
     }
diff --git a/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx b/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx
index da7db02..ab9e65e 100644
--- a/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx
@@ -306,7 +306,7 @@ namespace CPPU_CURRENT_NAMESPACE
             uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
 #if OSL_DEBUG_LEVEL > 0
             OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
-            OSL_ENSURE( 0, cstr.getStr() );
+            OSL_FAIL( cstr.getStr() );
 #endif
             return;
         }
@@ -327,7 +327,7 @@ namespace CPPU_CURRENT_NAMESPACE
             uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
 #if OSL_DEBUG_LEVEL > 0
             OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
-            OSL_ENSURE( 0, cstr.getStr() );
+            OSL_FAIL( cstr.getStr() );
 #endif
         }
         else
diff --git a/bridges/source/cpp_uno/gcc3_linux_hppa/except.cxx b/bridges/source/cpp_uno/gcc3_linux_hppa/except.cxx
index b8a335a..534d6d7 100644
--- a/bridges/source/cpp_uno/gcc3_linux_hppa/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_hppa/except.cxx
@@ -299,7 +299,7 @@ namespace CPPU_CURRENT_NAMESPACE
             uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
 #if OSL_DEBUG_LEVEL > 0
             OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
-            OSL_ENSURE( 0, cstr.getStr() );
+            OSL_FAIL( cstr.getStr() );
 #endif
             return;
         }
@@ -320,7 +320,7 @@ namespace CPPU_CURRENT_NAMESPACE
             uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
 #if OSL_DEBUG_LEVEL > 0
             OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
-            OSL_ENSURE( 0, cstr.getStr() );
+            OSL_FAIL( cstr.getStr() );
 #endif
         }
         else
diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx b/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx
index 152f7db..51206fb 100644
--- a/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx
@@ -303,7 +303,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
         uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
 #if OSL_DEBUG_LEVEL > 0
         OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
-        OSL_ENSURE( 0, cstr.getStr() );
+        OSL_FAIL( cstr.getStr() );
 #endif
         return;
     }
@@ -324,7 +324,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
         uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
 #if OSL_DEBUG_LEVEL > 0
         OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
-        OSL_ENSURE( 0, cstr.getStr() );
+        OSL_FAIL( cstr.getStr() );
 #endif
     }
     else
diff --git a/bridges/source/cpp_uno/gcc3_linux_m68k/except.cxx b/bridges/source/cpp_uno/gcc3_linux_m68k/except.cxx
index b8a335a..534d6d7 100644
--- a/bridges/source/cpp_uno/gcc3_linux_m68k/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_m68k/except.cxx
@@ -299,7 +299,7 @@ namespace CPPU_CURRENT_NAMESPACE
             uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
 #if OSL_DEBUG_LEVEL > 0
             OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
-            OSL_ENSURE( 0, cstr.getStr() );
+            OSL_FAIL( cstr.getStr() );
 #endif
             return;
         }
@@ -320,7 +320,7 @@ namespace CPPU_CURRENT_NAMESPACE
             uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
 #if OSL_DEBUG_LEVEL > 0
             OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
-            OSL_ENSURE( 0, cstr.getStr() );
+            OSL_FAIL( cstr.getStr() );
 #endif
         }
         else
diff --git a/bridges/source/cpp_uno/gcc3_linux_mips/except.cxx b/bridges/source/cpp_uno/gcc3_linux_mips/except.cxx
index ca6ff7b..c1520b3 100644
--- a/bridges/source/cpp_uno/gcc3_linux_mips/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_mips/except.cxx
@@ -290,7 +290,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
         uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
 #if defined _DEBUG
         OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
-        OSL_ENSURE( 0, cstr.getStr() );
+        OSL_FAIL( cstr.getStr() );
 #endif
         return;
     }
@@ -311,7 +311,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
         uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
 #if defined _DEBUG
         OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
-        OSL_ENSURE( 0, cstr.getStr() );
+        OSL_FAIL( cstr.getStr() );
 #endif
     }
     else
diff --git a/bridges/source/cpp_uno/gcc3_linux_sparc/except.cxx b/bridges/source/cpp_uno/gcc3_linux_sparc/except.cxx
index 5d9c3e9..5bc26f0 100644
--- a/bridges/source/cpp_uno/gcc3_linux_sparc/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_sparc/except.cxx
@@ -293,7 +293,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
         uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
 #if defined _DEBUG
         OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
-        OSL_ENSURE( 0, cstr.getStr() );
+        OSL_FAIL( cstr.getStr() );
 #endif
         return;
     }
@@ -314,7 +314,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
         uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
 #if defined _DEBUG
         OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
-        OSL_ENSURE( 0, cstr.getStr() );
+        OSL_FAIL( cstr.getStr() );
 #endif
     }
     else
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx
index 4492873..c56c047 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx
@@ -303,7 +303,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
         uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
 #if OSL_DEBUG_LEVEL > 0
         OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
-        OSL_ENSURE( 0, cstr.getStr() );
+        OSL_FAIL( cstr.getStr() );
 #endif
         return;
     }
@@ -324,7 +324,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
         uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
 #if OSL_DEBUG_LEVEL > 0
         OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
-        OSL_ENSURE( 0, cstr.getStr() );
+        OSL_FAIL( cstr.getStr() );
 #endif
     }
     else
diff --git a/bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx b/bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx
index 68fba9c..90df426 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx
@@ -294,7 +294,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
         uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
 #if OSL_DEBUG_LEVEL > 0
         OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
-        OSL_ENSURE( 0, cstr.getStr() );
+        OSL_FAIL( cstr.getStr() );
 #endif
         return;
     }
@@ -315,7 +315,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
         uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
 #if OSL_DEBUG_LEVEL > 0
         OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
-        OSL_ENSURE( 0, cstr.getStr() );
+        OSL_FAIL( cstr.getStr() );
 #endif
     }
     else
diff --git a/bridges/source/cpp_uno/gcc3_os2_intel/except.cxx b/bridges/source/cpp_uno/gcc3_os2_intel/except.cxx
index a240331..40effb9 100644
--- a/bridges/source/cpp_uno/gcc3_os2_intel/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_os2_intel/except.cxx
@@ -314,7 +314,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
         uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
 #if OSL_DEBUG_LEVEL > 0
         OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
-        OSL_ENSURE( 0, cstr.getStr() );
+        OSL_FAIL( cstr.getStr() );
 #endif
         return;
     }
@@ -335,7 +335,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
         uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
 #if OSL_DEBUG_LEVEL > 0
         OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
-        OSL_ENSURE( 0, cstr.getStr() );
+        OSL_FAIL( cstr.getStr() );
 #endif
     }
     else
diff --git a/bridges/source/cpp_uno/gcc3_solaris_intel/except.cxx b/bridges/source/cpp_uno/gcc3_solaris_intel/except.cxx
index fd7089d..57f0964 100644
--- a/bridges/source/cpp_uno/gcc3_solaris_intel/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_solaris_intel/except.cxx
@@ -294,7 +294,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
         uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
 #if OSL_DEBUG_LEVEL > 0
         OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
-        OSL_ENSURE( 0, cstr.getStr() );
+        OSL_FAIL( cstr.getStr() );
 #endif
         return;
     }
@@ -315,7 +315,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
         uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
 #if OSL_DEBUG_LEVEL > 0
         OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
-        OSL_ENSURE( 0, cstr.getStr() );
+        OSL_FAIL( cstr.getStr() );
 #endif
     }
     else
diff --git a/bridges/source/cpp_uno/gcc3_solaris_sparc/except.cxx b/bridges/source/cpp_uno/gcc3_solaris_sparc/except.cxx
index ec09865..f736fc7 100644
--- a/bridges/source/cpp_uno/gcc3_solaris_sparc/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_solaris_sparc/except.cxx
@@ -292,7 +292,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
         uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
 #if defined _DEBUG
         OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
-        OSL_ENSURE( 0, cstr.getStr() );
+        OSL_FAIL( cstr.getStr() );
 #endif
         return;
     }
@@ -313,7 +313,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
         uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
 #if defined _DEBUG
         OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
-        OSL_ENSURE( 0, cstr.getStr() );
+        OSL_FAIL( cstr.getStr() );
 #endif
     }
     else
diff --git a/bridges/source/cpp_uno/mingw_intel/except.cxx b/bridges/source/cpp_uno/mingw_intel/except.cxx
index c250452..cf56c2d 100644
--- a/bridges/source/cpp_uno/mingw_intel/except.cxx
+++ b/bridges/source/cpp_uno/mingw_intel/except.cxx
@@ -279,7 +279,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
         uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
 #if OSL_DEBUG_LEVEL > 0
         OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
-        OSL_ENSURE( 0, cstr.getStr() );
+        OSL_FAIL( cstr.getStr() );
 #endif
         return;
     }
@@ -300,7 +300,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
         uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
 #if OSL_DEBUG_LEVEL > 0
         OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
-        OSL_ENSURE( 0, cstr.getStr() );
+        OSL_FAIL( cstr.getStr() );
 #endif
     }
     else
diff --git a/bridges/source/cpp_uno/shared/component.cxx b/bridges/source/cpp_uno/shared/component.cxx
index cc118a7..0efc5d3 100644
--- a/bridges/source/cpp_uno/shared/component.cxx
+++ b/bridges/source/cpp_uno/shared/component.cxx
@@ -148,8 +148,8 @@ static void s_stub_computeObjectIdentifier(va_list * pParam)
         }
         catch (::com::sun::star::uno::RuntimeException &)
         {
-            OSL_ENSURE(
-                0, "### RuntimeException occurred udring queryInterface()!" );
+            OSL_FAIL(
+                "### RuntimeException occurred udring queryInterface()!" );
         }
     }
 }
diff --git a/bridges/source/jni_uno/jni_bridge.cxx b/bridges/source/jni_uno/jni_bridge.cxx
index 192acca..780ca92 100644
--- a/bridges/source/jni_uno/jni_bridge.cxx
+++ b/bridges/source/jni_uno/jni_bridge.cxx
@@ -115,15 +115,14 @@ void SAL_CALL Mapping_map_to_uno(
                 OUStringToOString(
                     OUSTR("[jni_uno bridge error] ") + err.m_message,
                     RTL_TEXTENCODING_ASCII_US ) );
-            OSL_ENSURE( 0, cstr_msg.getStr() );
+            OSL_FAIL( cstr_msg.getStr() );
 #else
             (void) err; // unused
 #endif
         }
         catch (::jvmaccess::VirtualMachine::AttachGuard::CreationException &)
         {
-            OSL_ENSURE(
-                0,
+            OSL_FAIL(
                 "[jni_uno bridge error] attaching current thread "
                 "to java failed!" );
         }
@@ -185,15 +184,14 @@ void SAL_CALL Mapping_map_to_java(
             OUStringToOString(
                 OUSTR("[jni_uno bridge error] ") + err.m_message,
                 RTL_TEXTENCODING_ASCII_US ) );
-        OSL_ENSURE( 0, cstr_msg.getStr() );
+        OSL_FAIL( cstr_msg.getStr() );
 #else
             (void) err; // unused
 #endif
     }
     catch (::jvmaccess::VirtualMachine::AttachGuard::CreationException &)
     {
-        OSL_ENSURE(
-            0,
+        OSL_FAIL(
             "[jni_uno bridge error] attaching current thread to java failed!" );
     }
 }
@@ -544,15 +542,14 @@ void SAL_CALL uno_ext_getMapping(
                 OUStringToOString(
                     OUSTR("[jni_uno bridge error] ") + err.m_message,
                     RTL_TEXTENCODING_ASCII_US ) );
-            OSL_ENSURE( 0, cstr_msg.getStr() );
+            OSL_FAIL( cstr_msg.getStr() );
 #else
             (void) err; // unused
 #endif
         }
         catch (::jvmaccess::VirtualMachine::AttachGuard::CreationException &)
         {
-            OSL_ENSURE(
-                0,
+            OSL_FAIL(
                 "[jni_uno bridge error] attaching current thread "
                 "to java failed!" );
         }
diff --git a/bridges/source/jni_uno/jni_java2uno.cxx b/bridges/source/jni_uno/jni_java2uno.cxx
index fc7a69c..9196afb 100644
--- a/bridges/source/jni_uno/jni_java2uno.cxx
+++ b/bridges/source/jni_uno/jni_java2uno.cxx
@@ -630,7 +630,7 @@ JNICALL Java_com_sun_star_bridges_jni_1uno_JNI_1proxy_dispatch_1call(
         OString cstr_msg(
             OUStringToOString(
                 buf.makeStringAndClear(), RTL_TEXTENCODING_JAVA_UTF8 ) );
-        OSL_ENSURE( 0, cstr_msg.getStr() );
+        OSL_FAIL( cstr_msg.getStr() );
         if (jni->ThrowNew(jni_info->m_class_RuntimeException, cstr_msg.getStr())
             != 0)
         {
@@ -646,7 +646,7 @@ JNICALL Java_com_sun_star_bridges_jni_1uno_JNI_1proxy_dispatch_1call(
                 "attaching current thread to java failed!") ) +
             OUStringToOString(
                 jni.get_stack_trace(), RTL_TEXTENCODING_JAVA_UTF8 ) );
-        OSL_ENSURE( 0, cstr_msg.getStr() );
+        OSL_FAIL( cstr_msg.getStr() );
         if (jni->ThrowNew(jni_info->m_class_RuntimeException, cstr_msg.getStr())
             != 0)
         {
diff --git a/bridges/source/jni_uno/jni_uno2java.cxx b/bridges/source/jni_uno/jni_uno2java.cxx
index 6e98119..0c5fa4e 100644
--- a/bridges/source/jni_uno/jni_uno2java.cxx
+++ b/bridges/source/jni_uno/jni_uno2java.cxx
@@ -576,15 +576,14 @@ void SAL_CALL UNO_proxy_free( uno_ExtEnvironment * env, void * proxy )
 #if OSL_DEBUG_LEVEL > 0
         OString cstr_msg2(
             OUStringToOString( err.m_message, RTL_TEXTENCODING_ASCII_US ) );
-        OSL_ENSURE( 0, cstr_msg2.getStr() );
+        OSL_FAIL( cstr_msg2.getStr() );
 #else
         (void) err; // unused
 #endif
     }
     catch (::jvmaccess::VirtualMachine::AttachGuard::CreationException &)
     {
-        OSL_ENSURE(
-            0,
+        OSL_FAIL(
             "[jni_uno bridge error] attaching current thread to java failed!" );
     }
 
@@ -865,7 +864,7 @@ void SAL_CALL UNO_proxy_dispatch(
 #if OSL_DEBUG_LEVEL > 0
         OString cstr_msg2(
             OUStringToOString( exc.Message, RTL_TEXTENCODING_ASCII_US ) );
-        OSL_ENSURE( 0, cstr_msg2.getStr() );
+        OSL_FAIL( cstr_msg2.getStr() );
 #endif
     }
 }
diff --git a/bridges/source/remote/urp/urp_environment.cxx b/bridges/source/remote/urp/urp_environment.cxx
index 9f13e60..af445e2 100644
--- a/bridges/source/remote/urp/urp_environment.cxx
+++ b/bridges/source/remote/urp/urp_environment.cxx
@@ -383,7 +383,7 @@ static void SAL_CALL RemoteEnvironment_thisDisposing(
 static void SAL_CALL RemoteEnvironment_thisComputeObjectIdentifier(
     uno_ExtEnvironment *, rtl_uString **, void *)
 {
-    OSL_ENSURE( 0, "RemoteEnvironment_thisComputeObjectIdentifier should never be called" );
+    OSL_FAIL( "RemoteEnvironment_thisComputeObjectIdentifier should never be called" );
 }
 
 static void SAL_CALL RemoteEnvironment_thisAcquireInterface(
diff --git a/bridges/source/remote/urp/urp_propertyobject.cxx b/bridges/source/remote/urp/urp_propertyobject.cxx
index 95c290e..c32b87f 100644
--- a/bridges/source/remote/urp/urp_propertyobject.cxx
+++ b/bridges/source/remote/urp/urp_propertyobject.cxx
@@ -369,7 +369,7 @@ void SAL_CALL PropertyObject::thisDispatch(
     switch( pMethodType->aBase.nPosition )
     {
     case METHOD_QUERY_INTERFACE:
-        OSL_ENSURE( 0 , "not implemented yet !" );
+        OSL_FAIL( "not implemented yet !" );
         break;
     case METHOD_GET_PROPERTIES:
     {
@@ -388,7 +388,7 @@ void SAL_CALL PropertyObject::thisDispatch(
         break;
     }
     default:
-        OSL_ENSURE( 0 , "unkown method !" );
+        OSL_FAIL( "unkown method !" );
     }
 }
 
@@ -423,7 +423,7 @@ void SAL_CALL PropertyObject::localGetPropertiesFromRemote( struct Properties *p
 
     if( pException )
     {
-        OSL_ENSURE( 0 , "remote urp-bridge doesn't support property-object" );
+        OSL_FAIL( "remote urp-bridge doesn't support property-object" );
         uno_any_destruct( pException , 0 );
         return;
     }
@@ -433,7 +433,7 @@ void SAL_CALL PropertyObject::localGetPropertiesFromRemote( struct Properties *p
     {
         if( ! assignFromIdlToStruct( pR , pP[i] ) )
         {
-            OSL_ENSURE( 0 , "unknown property !!!!" );
+            OSL_FAIL( "unknown property !!!!" );
         }
     }
 
diff --git a/bridges/source/remote/urp/urp_reader.cxx b/bridges/source/remote/urp/urp_reader.cxx
index 8b0ca3b..13df71a 100644
--- a/bridges/source/remote/urp/urp_reader.cxx
+++ b/bridges/source/remote/urp/urp_reader.cxx
@@ -115,7 +115,7 @@ inline sal_Bool OReaderThread::getMemberTypeDescription(
         sMessage.appendAscii( "interface type is not of typeclass interface (" );
         sMessage.append( (sal_Int32) pITypeRef->eTypeClass );
         m_pBridgeImpl->addError( sMessage.makeStringAndClear() );
-        OSL_ENSURE( 0 , "type is not an interface" );
+        OSL_FAIL( "type is not an interface" );
         return sal_False;
     }
 
@@ -128,7 +128,7 @@ inline sal_Bool OReaderThread::getMemberTypeDescription(
         sMessage.appendAscii( "No typedescription can be retrieved for type " );
         sMessage.append( OUString( pITypeRef->pTypeName ) );
         m_pBridgeImpl->addError( sMessage.makeStringAndClear() );
-        OSL_ENSURE( 0 , "urp: unknown type " );
+        OSL_FAIL( "urp: unknown type " );
         return sal_False;
     }
 
@@ -147,7 +147,7 @@ inline sal_Bool OReaderThread::getMemberTypeDescription(
         sMessage.appendAscii( " )" );
         m_pBridgeImpl->addError( sMessage.makeStringAndClear() );
 
-        OSL_ENSURE( 0 , "vtable index out of range" );
+        OSL_FAIL( "vtable index out of range" );
         return sal_False;
     }
 
@@ -163,7 +163,7 @@ inline sal_Bool OReaderThread::getMemberTypeDescription(
         sMessage.appendAscii( " )" );
         m_pBridgeImpl->addError( sMessage.makeStringAndClear() );
 
-        OSL_ENSURE( 0 , "vtable index out of range" );
+        OSL_FAIL( "vtable index out of range" );
         return sal_False;
     }
 
@@ -181,7 +181,7 @@ inline sal_Bool OReaderThread::getMemberTypeDescription(
         sMessage.appendAscii( " )" );
         m_pBridgeImpl->addError( sMessage.makeStringAndClear() );
 
-        OSL_ENSURE( 0 , "unknown method type description" );
+        OSL_FAIL( "unknown method type description" );
         return sal_False;
     }
 
@@ -295,7 +295,7 @@ inline sal_Bool OReaderThread::readBlock( sal_Int32 *pnMessageCount )
         s.append( (sal_Int64) (sal_uInt32 ) nSize );
         s.append( sal_Unicode( ')' ) );
         m_pBridgeImpl->addError( s.makeStringAndClear() );
-        OSL_ENSURE( 0 , "urp bridge: Packet-size too big" );
+        OSL_FAIL( "urp bridge: Packet-size too big" );
         return sal_False;
     }
 
@@ -313,7 +313,7 @@ inline sal_Bool OReaderThread::readBlock( sal_Int32 *pnMessageCount )
         s.append( (sal_Int64) (sal_uInt32 ) nSize );
         s.append( sal_Unicode( ')' ) );
         m_pBridgeImpl->addError( s.makeStringAndClear() );
-        OSL_ENSURE( 0 , "urp bridge: messages size too large, terminating connection" );
+        OSL_FAIL( "urp bridge: messages size too large, terminating connection" );
         return sal_False;
     }
 
@@ -461,7 +461,7 @@ void OReaderThread::run()
             if( ! readFlags( &flags ) )
             {
                 m_pBridgeImpl->addError( "incomplete message, skipping block" );
-                OSL_ENSURE ( 0 , "urp-bridge : incomplete message, skipping block" );
+                OSL_FAIL( "urp-bridge : incomplete message, skipping block" );
                 break;
             }
 
@@ -494,7 +494,7 @@ void OReaderThread::run()
                 {
                     typelib_typedescriptionreference_release( pTypeRef );
                     m_pBridgeImpl->addError( "error during unpacking (maybe cached) interface type" );
-                    OSL_ENSURE( 0 , "urp-bridge : error during unpacking interface type, terminating connection" );
+                    OSL_FAIL( "urp-bridge : error during unpacking interface type, terminating connection" );
                     disposeEnvironment();
                     break;
                 }
@@ -504,7 +504,7 @@ void OReaderThread::run()
                     sMessage.appendAscii( "interface type is not of typeclass interface (" );
                     sMessage.append( (sal_Int32) m_pBridgeImpl->m_lastInType.getTypeClass() );
                     m_pBridgeImpl->addError( sMessage.makeStringAndClear() );
-                    OSL_ENSURE( 0 , "urp-bridge : not an interface type" );
+                    OSL_FAIL( "urp-bridge : not an interface type" );
                     disposeEnvironment();
                     break;
                 }
@@ -521,7 +521,7 @@ void OReaderThread::run()
                 {
                     rtl_uString_release( pOid );
                     m_pBridgeImpl->addError( "error during unpacking (maybe cached) oid" );
-                    OSL_ENSURE( 0 , "urp-bridge : error during unpacking cached data, terminating connection" );
+                    OSL_FAIL( "urp-bridge : error during unpacking cached data, terminating connection" );
                     disposeEnvironment();
                     break;
                 }
@@ -540,7 +540,7 @@ void OReaderThread::run()
                     rtl_byte_sequence_release( pSeq );
 
                     m_pBridgeImpl->addError( "error during unpacking (maybe cached) tid" );
-                    OSL_ENSURE( 0 , "urp-bridge : error during unpacking cached data, terminating connection" );
+                    OSL_FAIL( "urp-bridge : error during unpacking cached data, terminating connection" );
                     disposeEnvironment();
                     break;
                 }
diff --git a/cli_ure/source/climaker/climaker_app.cxx b/cli_ure/source/climaker/climaker_app.cxx
index 1dc4d05..a5e7393 100644
--- a/cli_ure/source/climaker/climaker_app.cxx
+++ b/cli_ure/source/climaker/climaker_app.cxx
@@ -150,8 +150,8 @@ static OptionInfo const * get_option_info(
             }
         }
     }
-    OSL_ENSURE(
-        0, OUStringToOString( opt, osl_getThreadTextEncoding() ).getStr() );
+    OSL_FAIL(
+        OUStringToOString( opt, osl_getThreadTextEncoding() ).getStr() );
     return 0;
 }
 
@@ -449,7 +449,7 @@ SAL_IMPLEMENT_MAIN()
                         }
                         else
                         {
-                            OSL_ENSURE( 0, "unhandled valid option?!" );
+                            OSL_FAIL( "unhandled valid option?!" );
                             if (option_info->m_has_argument)
                                 ++nPos;
                         }
diff --git a/cli_ure/source/uno_bridge/cli_bridge.cxx b/cli_ure/source/uno_bridge/cli_bridge.cxx
index 461d92e..4341810 100644
--- a/cli_ure/source/uno_bridge/cli_bridge.cxx
+++ b/cli_ure/source/uno_bridge/cli_bridge.cxx
@@ -112,7 +112,7 @@ void SAL_CALL Mapping_cli2uno(
         OString cstr_msg(
             OUStringToOString(
                 OUSTR("[cli_uno bridge error] ") + err.m_message, RTL_TEXTENCODING_ASCII_US ) );
-        OSL_ENSURE( 0, cstr_msg.getStr() );
+        OSL_FAIL( cstr_msg.getStr() );
 #else
         (void) err; // unused
 #endif
@@ -171,7 +171,7 @@ void SAL_CALL Mapping_uno2cli(
         rtl::OString cstr_msg(
             rtl::OUStringToOString(
                 OUSTR("[cli_uno bridge error] ") + err.m_message, RTL_TEXTENCODING_ASCII_US ) );
-        OSL_ENSURE( 0, cstr_msg.getStr() );
+        OSL_FAIL( cstr_msg.getStr() );
 #else
         (void) err; // unused
 #endif
@@ -352,7 +352,7 @@ void SAL_CALL uno_ext_getMapping(
         OString cstr_msg(
             OUStringToOString(
                 OUSTR("[cli_uno bridge error] ") + err.m_message, RTL_TEXTENCODING_ASCII_US ) );
-        OSL_ENSURE( 0, cstr_msg.getStr() );
+        OSL_FAIL( cstr_msg.getStr() );
 #else
         (void) err; // unused
 #endif
diff --git a/cli_ure/source/uno_bridge/cli_proxy.cxx b/cli_ure/source/uno_bridge/cli_proxy.cxx
index ef9e614..63ae46f 100644
--- a/cli_ure/source/uno_bridge/cli_proxy.cxx
+++ b/cli_ure/source/uno_bridge/cli_proxy.cxx
@@ -310,8 +310,8 @@ bool UnoInterfaceProxy::CanCastTo(System::Type* fromType,
     catch (BridgeRuntimeError& e)
     {
         (void) e; // avoid warning
-        OSL_ENSURE(
-            0, OUStringToOString(
+        OSL_FAIL(
+            OUStringToOString(
                 e.m_message, RTL_TEXTENCODING_UTF8 ).getStr() );
     }
     catch (System::Exception* e)
@@ -321,14 +321,14 @@ bool UnoInterfaceProxy::CanCastTo(System::Type* fromType,
             S"UnoInterfaceProxy::CanCastTo().  Original"
             S"message: \n");
         msg= System::String::Concat(msg, e->get_Message());
-        OSL_ENSURE(
-            0, OUStringToOString(
+        OSL_FAIL(
+            OUStringToOString(
                 mapCliString(msg), RTL_TEXTENCODING_UTF8 ).getStr() );
     }
     catch (...)
     {
-        OSL_ENSURE(
-            0, "An unexpected native C++ exception occurred in "
+        OSL_FAIL(
+            "An unexpected native C++ exception occurred in "
             "UnoInterfaceProxy::CanCastTo()" );
     }    
     __finally
@@ -1172,7 +1172,7 @@ void SAL_CALL cli_proxy_dispatch(
 #if OSL_DEBUG_LEVEL >= 1
         OString cstr_msg(OUStringToOString(exc.Message,
                                              RTL_TEXTENCODING_ASCII_US ) );
-        OSL_ENSURE(0, cstr_msg.getStr());
+        OSL_FAIL(cstr_msg.getStr());
 #endif
     }
 }
diff --git a/cppu/source/uno/copy.hxx b/cppu/source/uno/copy.hxx
index 5b77911..4279685 100644
--- a/cppu/source/uno/copy.hxx
+++ b/cppu/source/uno/copy.hxx
@@ -252,7 +252,7 @@ inline void _copyConstructAnyFromData(
         *(typelib_TypeDescriptionReference **)&pDestAny->pReserved = *(typelib_TypeDescriptionReference **)pSource;
         break;
     case typelib_TypeClass_ANY:
-        OSL_ENSURE( 0, "### unexpected nested any!" );
+        OSL_FAIL( "### unexpected nested any!" );
         break;
     case typelib_TypeClass_ENUM:
         pDestAny->pData = &pDestAny->pReserved;
@@ -729,7 +729,7 @@ inline uno_Sequence * icopyConstructSequence(
                 break;
             }
             default:
-                OSL_ENSURE( 0, "### unexepcted sequence element type!" );
+                OSL_FAIL( "### unexepcted sequence element type!" );
                 pDest = 0;
                 break;
             }
diff --git a/cppu/source/uno/data.cxx b/cppu/source/uno/data.cxx
index b23e12a..3053d72 100644
--- a/cppu/source/uno/data.cxx
+++ b/cppu/source/uno/data.cxx
@@ -115,7 +115,7 @@ void * binuno_queryInterface( void * pUnoI, typelib_TypeDescriptionReference * p
         buf.append( * reinterpret_cast< OUString const * >( pExc->pData ) );
         OString cstr(
             OUStringToOString( buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US ) );
-        OSL_ENSURE( 0, cstr.getStr() );
+        OSL_FAIL( cstr.getStr() );
 #endif
         uno_any_destruct( pExc, 0 );
     }
diff --git a/cppu/source/uno/destr.hxx b/cppu/source/uno/destr.hxx
index 464dc93..0504325 100644
--- a/cppu/source/uno/destr.hxx
+++ b/cppu/source/uno/destr.hxx
@@ -152,7 +152,7 @@ inline void _destructAny(
         ::rtl_freeMemory( pAny->pData );
         break;
     case typelib_TypeClass_TYPEDEF:
-        OSL_ENSURE( 0, "### unexpected typedef!" );
+        OSL_FAIL( "### unexpected typedef!" );
         break;
     case typelib_TypeClass_STRUCT:
     case typelib_TypeClass_EXCEPTION:
@@ -381,7 +381,7 @@ inline void _destructData(
         _destructAny( (uno_Any *)pValue, release );
         break;
     case typelib_TypeClass_TYPEDEF:
-        OSL_ENSURE( 0, "### unexpected typedef!" );
+        OSL_FAIL( "### unexpected typedef!" );
         break;
     case typelib_TypeClass_STRUCT:
     case typelib_TypeClass_EXCEPTION:
diff --git a/cppu/source/uno/sequence.cxx b/cppu/source/uno/sequence.cxx
index 775ea01..49ff8c9 100644
--- a/cppu/source/uno/sequence.cxx
+++ b/cppu/source/uno/sequence.cxx
@@ -351,7 +351,7 @@ static inline bool idefaultConstructElements(
         }
         break;
     default:
-        OSL_ENSURE( 0, "### unexpected element type!" );
+        OSL_FAIL( "### unexpected element type!" );
         pSeq = 0;
         break;
     }
@@ -665,7 +665,7 @@ static inline bool icopyConstructFromElements(
         break;
     }
     default:
-        OSL_ENSURE( 0, "### unexpected element type!" );
+        OSL_FAIL( "### unexpected element type!" );
         pSeq = 0;
         break;
     }
diff --git a/cppuhelper/source/bootstrap.cxx b/cppuhelper/source/bootstrap.cxx
index 17db064..e1f1926 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 0530965..c83d781 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 1fe9860..60e039b 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 dd5c5bd..8bf50f4 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 d37f069..d4c25d9 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 01452d8..48ccf55 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 >() );
         }
diff --git a/io/test/testconnection.cxx b/io/test/testconnection.cxx
index fe06374..f8fdf35 100644
--- a/io/test/testconnection.cxx
+++ b/io/test/testconnection.cxx
@@ -163,7 +163,7 @@ void testConnection( const OUString &sConnectionDescription  ,
         {
             Sequence < sal_Int8 > seq(10);
             r->write( seq );
-            OSL_ENSURE( 0 , "expected exception not thrown" );
+            OSL_FAIL( "expected exception not thrown" );
         }
         catch ( IOException & )
         {
@@ -171,7 +171,7 @@ void testConnection( const OUString &sConnectionDescription  ,
         }
         catch ( ... )
         {
-            OSL_ENSURE( 0 , "wrong exception was thrown" );			
+            OSL_FAIL( "wrong exception was thrown" );
         }
 
         thread.join();	
@@ -231,7 +231,7 @@ int __cdecl main( int argc, char * argv[] )
     try
     {
         rAcceptor->accept( OUString() );
-        OSL_ENSURE( 0 , "empty connection string" );
+        OSL_FAIL( "empty connection string" );
     }
     catch( IllegalArgumentException & )
     {
@@ -239,13 +239,13 @@ int __cdecl main( int argc, char * argv[] )
     }
     catch( ... )
     {
-        OSL_ENSURE( 0, "unexpected akexception with empty connection string" );
+        OSL_FAIL( "unexpected akexception with empty connection string" );
     }
 
     try
     {
         rConnector->connect( OUString() );
-        OSL_ENSURE( 0 , "empty connection string" );
+        OSL_FAIL( "empty connection string" );
     }
     catch( ConnectionSetupException & )
     {
@@ -253,7 +253,7 @@ int __cdecl main( int argc, char * argv[] )
     }
     catch( ... )
     {
-        OSL_ENSURE( 0, "unexpected exception with empty connection string" );
+        OSL_FAIL( "unexpected exception with empty connection string" );
     }
 
     
@@ -265,7 +265,7 @@ int __cdecl main( int argc, char * argv[] )
     try
     {
         rAcceptor->accept( OUString(RTL_CONSTASCII_USTRINGPARAM("socket,host=localhost,port=2001")) );
-        OSL_ENSURE( 0 , "already existing exception expected" );
+        OSL_FAIL( "already existing exception expected" );
     }
     catch( AlreadyAcceptingException & e)
     {
@@ -273,7 +273,7 @@ int __cdecl main( int argc, char * argv[] )
     }
     catch( ... )
     {
-        OSL_ENSURE( 0, "unknown exception, already existing existing expected" );
+        OSL_FAIL( "unknown exception, already existing existing expected" );
     }
 
     rAcceptor->stopAccepting();
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx b/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx
index 0f5263f..add08b5 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx
@@ -267,7 +267,7 @@ bool VendorBase::needsRestart() const
 
 int VendorBase::compareVersions(const rtl::OUString& /*sSecond*/) const
 {
-    OSL_ENSURE(0, "[Java framework] VendorBase::compareVersions must be "
+    OSL_FAIL("[Java framework] VendorBase::compareVersions must be "
                "overridden in derived class.");
     return 0;
 }
diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx
index 3692eed..f7beee1 100644
--- a/jvmfwk/source/framework.cxx
+++ b/jvmfwk/source/framework.cxx
@@ -240,7 +240,7 @@ javaFrameworkError SAL_CALL jfw_findAllJREs(JavaInfo ***pparInfo, sal_Int32 *pSi
     {
         retVal = e.errorCode;
         fprintf(stderr, "%s\n", e.message.getStr());
-        OSL_ENSURE(0, e.message.getStr());
+        OSL_FAIL(e.message.getStr());
     }
     return retVal;
 }
@@ -418,7 +418,7 @@ javaFrameworkError SAL_CALL jfw_startVM(JavaVMOption *arOptions, sal_Int32 cOpti
     {
         errcode = e.errorCode;
         fprintf(stderr, "%s\n", e.message.getStr());
-        OSL_ENSURE(0, e.message.getStr());
+        OSL_FAIL(e.message.getStr());
     }
  
     return errcode;
@@ -627,7 +627,7 @@ javaFrameworkError SAL_CALL jfw_findAndSelectJRE(JavaInfo **pInfo)
     {
         errcode = e.errorCode;
         fprintf(stderr, "%s\n", e.message.getStr());
-        OSL_ENSURE(0, e.message.getStr());
+        OSL_FAIL(e.message.getStr());
     }
  
     return errcode;
@@ -716,7 +716,7 @@ javaFrameworkError SAL_CALL jfw_getSelectedJRE(JavaInfo **ppInfo)
     {
         errcode = e.errorCode;
         fprintf(stderr, "%s\n", e.message.getStr());
-        OSL_ENSURE(0, e.message.getStr());
+        OSL_FAIL(e.message.getStr());
     }
     return errcode;
 }
@@ -844,7 +844,7 @@ javaFrameworkError SAL_CALL jfw_getJavaInfoByPath(
     {
         errcode = e.errorCode;
         fprintf(stderr, "%s\n", e.message.getStr());
-        OSL_ENSURE(0, e.message.getStr());
+        OSL_FAIL(e.message.getStr());
     }
  
     return errcode;
@@ -878,7 +878,7 @@ javaFrameworkError SAL_CALL jfw_setSelectedJRE(JavaInfo const *pInfo)
     {
         errcode = e.errorCode;
         fprintf(stderr, "%s\n", e.message.getStr());
-        OSL_ENSURE(0, e.message.getStr());
+        OSL_FAIL(e.message.getStr());
     }
     return errcode;
 }
@@ -911,7 +911,7 @@ javaFrameworkError SAL_CALL jfw_setEnabled(sal_Bool bEnabled)
     {
         errcode = e.errorCode;
         fprintf(stderr, "%s\n", e.message.getStr());
-        OSL_ENSURE(0, e.message.getStr());
+        OSL_FAIL(e.message.getStr());
     }
     return errcode;
 }
@@ -933,7 +933,7 @@ javaFrameworkError SAL_CALL jfw_getEnabled(sal_Bool *pbEnabled)
     {
         errcode = e.errorCode;
         fprintf(stderr, "%s\n", e.message.getStr());
-        OSL_ENSURE(0, e.message.getStr());
+        OSL_FAIL(e.message.getStr());
     }
     return errcode;
 }
@@ -958,7 +958,7 @@ javaFrameworkError SAL_CALL jfw_setVMParameters(
     {
         errcode = e.errorCode;
         fprintf(stderr, "%s\n", e.message.getStr());
-        OSL_ENSURE(0, e.message.getStr());
+        OSL_FAIL(e.message.getStr());
     }
 
     return errcode;
@@ -983,7 +983,7 @@ javaFrameworkError SAL_CALL jfw_getVMParameters(
     {
         errcode = e.errorCode;
         fprintf(stderr, "%s\n", e.message.getStr());
-        OSL_ENSURE(0, e.message.getStr());
+        OSL_FAIL(e.message.getStr());
     }
     return errcode;
 }
@@ -1006,7 +1006,7 @@ javaFrameworkError SAL_CALL jfw_setUserClassPath(rtl_uString * pCp)
     {
         errcode = e.errorCode;
         fprintf(stderr, "%s\n", e.message.getStr());
-        OSL_ENSURE(0, e.message.getStr());
+        OSL_FAIL(e.message.getStr());
     }
     return errcode;
 }
@@ -1029,7 +1029,7 @@ javaFrameworkError SAL_CALL jfw_getUserClassPath(rtl_uString ** ppCP)
     {
         errcode = e.errorCode;
         fprintf(stderr, "%s\n", e.message.getStr());
-        OSL_ENSURE(0, e.message.getStr());
+        OSL_FAIL(e.message.getStr());
     }
     return errcode;
 }
@@ -1053,7 +1053,7 @@ javaFrameworkError SAL_CALL jfw_addJRELocation(rtl_uString * sLocation)
     {
         errcode = e.errorCode;
         fprintf(stderr, "%s\n", e.message.getStr());
-        OSL_ENSURE(0, e.message.getStr());
+        OSL_FAIL(e.message.getStr());
     }
  
     return errcode;
@@ -1079,7 +1079,7 @@ javaFrameworkError SAL_CALL jfw_setJRELocations(
     {
         errcode = e.errorCode;
         fprintf(stderr, "%s\n", e.message.getStr());
-        OSL_ENSURE(0, e.message.getStr());
+        OSL_FAIL(e.message.getStr());
     }
     return errcode;
 
@@ -1104,7 +1104,7 @@ javaFrameworkError SAL_CALL jfw_getJRELocations(
     {
         errcode = e.errorCode;
         fprintf(stderr, "%s\n", e.message.getStr());
-        OSL_ENSURE(0, e.message.getStr());
+        OSL_FAIL(e.message.getStr());
     }
     
     return errcode;    
diff --git a/jvmfwk/source/fwkbase.cxx b/jvmfwk/source/fwkbase.cxx
index ed55703..4d7de4b 100644
--- a/jvmfwk/source/fwkbase.cxx
+++ b/jvmfwk/source/fwkbase.cxx
@@ -125,7 +125,7 @@ VendorSettings::VendorSettings():
     {
         OString sMsg("[Java framework] A vendor settings file was not specified."
                "Check the bootstrap parameter " UNO_JAVA_JFW_VENDOR_SETTINGS ".");
-        OSL_ENSURE(0, sMsg.getStr());
+        OSL_FAIL(sMsg.getStr());
         throw FrameworkException(JFW_E_CONFIGURATION, sMsg);
     }
     if (sSettingsPath.getLength() > 0)
diff --git a/sal/cpprt/operators_new_delete.cxx b/sal/cpprt/operators_new_delete.cxx
index e5d8ed0..2092432 100644
--- a/sal/cpprt/operators_new_delete.cxx
+++ b/sal/cpprt/operators_new_delete.cxx
@@ -93,7 +93,7 @@ struct AllocatorTraits
         p = static_cast<char*>(p) - sizeof(signature_type);
         if (memcmp (p, m_signature, sizeof(signature_type)) != 0)
         {
-            OSL_ENSURE(0, "operator delete mismatch");
+            OSL_FAIL("operator delete mismatch");
         }
 #endif  /* OSL_DEBUG_LEVEL */
         return p;
diff --git a/sal/osl/os2/file.cxx b/sal/osl/os2/file.cxx
index dde9158..571557f 100644
--- a/sal/osl/os2/file.cxx
+++ b/sal/osl/os2/file.cxx
@@ -481,7 +481,7 @@ oslFileError SAL_CALL osl_closeDirectory( oslDirectory Directory )
         err = osl_File_E_None;
         break;
     default:
-        OSL_ENSURE( 0, "Invalid directory type" );
+        OSL_FAIL( "Invalid directory type" );
         break;
     }
 
diff --git a/sal/osl/os2/file_url.cxx b/sal/osl/os2/file_url.cxx
index d0c1853..7abcaaa 100644
--- a/sal/osl/os2/file_url.cxx
+++ b/sal/osl/os2/file_url.cxx
@@ -783,7 +783,7 @@ oslFileError osl_getSystemPathFromFileURL_Ex(
 
             message = szBuffer;
         }
-        OSL_ENSURE( 0, message );
+        OSL_FAIL( message );
     }
 
 #endif // OSL_DEBUG_LEVEL > 0
diff --git a/sal/osl/unx/file_url.cxx b/sal/osl/unx/file_url.cxx
index b59f350..21fbe37 100644
--- a/sal/osl/unx/file_url.cxx
+++ b/sal/osl/unx/file_url.cxx
@@ -138,7 +138,7 @@ static sal_Bool findWrongUsage( const sal_Unicode *path, sal_Int32 len )
 
 oslFileError SAL_CALL osl_getCanonicalName( rtl_uString* ustrFileURL, rtl_uString** pustrValidURL )
 {
-    OSL_ENSURE(0, "osl_getCanonicalName not implemented");
+    OSL_FAIL("osl_getCanonicalName not implemented");
 
     rtl_uString_newFromString(pustrValidURL, ustrFileURL);
     return osl_File_E_None;
@@ -160,7 +160,7 @@ oslFileError SAL_CALL osl_getSystemPathFromFileURL( rtl_uString *ustrFileURL, rt
     /*
     if( (sal_Unicode) '/' == ustrFileURL->buffer[0] ) 
     {
-        OSL_ENSURE( 0, "osl_getSystemPathFromFileURL: input is already system path" );
+        OSL_FAIL( "osl_getSystemPathFromFileURL: input is already system path" );
         rtl_uString_assign( pustrSystemPath, ustrFileURL );
         return osl_File_E_None;
     }
@@ -317,14 +317,14 @@ oslFileError SAL_CALL osl_getFileURLFromSystemPath( rtl_uString *ustrSystemPath,
     /*
         if( 0 == rtl_ustr_ascii_shortenedCompare_WithLength( ustrSystemPath->buffer, ustrSystemPath->length,"file://", 7 ) )
         {
-            OSL_ENSURE( 0, "osl_getFileURLFromSystemPath: input is already file URL" );
+            OSL_FAIL( "osl_getFileURLFromSystemPath: input is already file URL" );
             rtl_uString_assign( pustrFileURL, ustrSystemPath );
         }
         else
         {
             rtl_uString *pTmp2 = NULL;
 
-            OSL_ENSURE( 0, "osl_getFileURLFromSystemPath: input is wrong file URL" );
+            OSL_FAIL( "osl_getFileURLFromSystemPath: input is wrong file URL" );
             rtl_uString_newFromStr_WithLength( pustrFileURL, ustrSystemPath->buffer + 5, ustrSystemPath->length - 5 );
             rtl_uString_newFromAscii( &pTmp2, "file://" );
             rtl_uString_newConcat( pustrFileURL, *pustrFileURL, pTmp2 );
diff --git a/sal/osl/w32/file_dirvol.cxx b/sal/osl/w32/file_dirvol.cxx
index fe63d19..ac94242 100644
--- a/sal/osl/w32/file_dirvol.cxx
+++ b/sal/osl/w32/file_dirvol.cxx
@@ -1030,7 +1030,7 @@ oslFileError SAL_CALL osl_closeDirectory(oslDirectory Directory)
             }
             break;
         default:
-            OSL_ENSURE( 0, "Invalid directory type" );
+            OSL_FAIL( "Invalid directory type" );
             break;
         }
 
diff --git a/stoc/source/corereflection/crefl.cxx b/stoc/source/corereflection/crefl.cxx
index 8949d41..3f9555c 100644
--- a/stoc/source/corereflection/crefl.cxx
+++ b/stoc/source/corereflection/crefl.cxx
@@ -531,7 +531,7 @@ sal_Bool SAL_CALL component_writeInfo(
         {
 #if OSL_DEBUG_LEVEL > 0
             OString cstr( OUStringToOString( exc.Message, RTL_TEXTENCODING_ASCII_US ) );
-            OSL_ENSURE( 0, cstr.getStr() );
+            OSL_FAIL( cstr.getStr() );
 #else
             (void) exc; // unused
 #endif
diff --git a/stoc/source/implementationregistration/implreg.cxx b/stoc/source/implementationregistration/implreg.cxx
index cae2922..7506096 100644
--- a/stoc/source/implementationregistration/implreg.cxx
+++ b/stoc/source/implementationregistration/implreg.cxx
@@ -1667,7 +1667,7 @@ sal_Bool ImplementationRegistration::revokeImplementation(const OUString& locati
         {
             // no way to transport the error, as no exception is specified and a runtime
             // exception is not appropriate.
-            OSL_ENSURE( 0 , "InvalidRegistryException during revokeImplementation" );
+            OSL_FAIL( "InvalidRegistryException during revokeImplementation" );
         }
     }
 
diff --git a/stoc/source/loader/dllcomponentloader.cxx b/stoc/source/loader/dllcomponentloader.cxx
index b700247..215b0a9 100644
--- a/stoc/source/loader/dllcomponentloader.cxx
+++ b/stoc/source/loader/dllcomponentloader.cxx
@@ -179,7 +179,7 @@ Sequence<OUString> SAL_CALL DllComponentLoader::getSupportedServiceNames(  )
 void DllComponentLoader::initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& )
     throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException)
 {
-    OSL_ENSURE( 0, "dllcomponentloader::initialize should not be called !" );
+    OSL_FAIL( "dllcomponentloader::initialize should not be called !" );
 //  	if( aArgs.getLength() != 1 )
 //  	{
 //  		throw IllegalArgumentException();
diff --git a/stoc/source/security/access_controller.cxx b/stoc/source/security/access_controller.cxx
index 914b174..7350c4a 100644
--- a/stoc/source/security/access_controller.cxx
+++ b/stoc/source/security/access_controller.cxx
@@ -689,7 +689,7 @@ void AccessController::checkAndClearPostPoned() SAL_THROW( (RuntimeException) )
             break;
         }
         default:
-            OSL_ENSURE( 0, "### this should never be called in this ac mode!" );
+            OSL_FAIL( "### this should never be called in this ac mode!" );
             break;
         }
     }
@@ -743,7 +743,7 @@ PermissionCollection AccessController::getEffectivePermissions(
         break;
     }
     default:
-        OSL_ENSURE( 0, "### this should never be called in this ac mode!" );
+        OSL_FAIL( "### this should never be called in this ac mode!" );
         return PermissionCollection();
     }
     
diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx
index 1a5d8ae..d617f38 100644
--- a/stoc/source/servicemanager/servicemanager.cxx
+++ b/stoc/source/servicemanager/servicemanager.cxx
@@ -1376,7 +1376,7 @@ void OServiceManager::initialize( Sequence< Any > const & )
     throw (Exception)
 {
     check_undisposed();
-    OSL_ENSURE( 0, "not impl!" );
+    OSL_FAIL( "not impl!" );
 }
 
 // XServiceInfo
diff --git a/stoc/test/javavm/testjavavm.cxx b/stoc/test/javavm/testjavavm.cxx
index 8114e99..d0b2af1 100644
--- a/stoc/test/javavm/testjavavm.cxx
+++ b/stoc/test/javavm/testjavavm.cxx
@@ -79,7 +79,7 @@ sal_Bool testJavaVM(const Reference< XMultiServiceFactory > & xMgr )
     Any anyVM = xVM->getJavaVM( Sequence<sal_Int8>(arId, 16));
     if ( ! anyVM.hasValue())
     {
-        OSL_ENSURE(0,"could not get Java VM");
+        OSL_FAIL("could not get Java VM");
         return sal_False;
     }
 
commit 547e296bf1edbd5ef4811d6db00164b113745df8
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Sat Mar 12 11:50:48 2011 +0100

    Remove unnecessary brackets

diff --git a/bridges/source/remote/urp/urp_reader.cxx b/bridges/source/remote/urp/urp_reader.cxx
index fe75f8b..8b0ca3b 100644
--- a/bridges/source/remote/urp/urp_reader.cxx
+++ b/bridges/source/remote/urp/urp_reader.cxx
@@ -566,8 +566,8 @@ void OReaderThread::run()
                     if ( !ok )
                     {
                         OSL_FAIL(
-                            ("urp_bridge: error while unpacking current"
-                             " context") );
+                            "urp_bridge: error while unpacking current"
+                             " context" );
                         disposeEnvironment();
                         break;
                     }
commit acde18989db7b3287da1c79b4b588213f6c9ff0c
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Sat Mar 12 11:49:53 2011 +0100

    Move OSL_ENSURE(false,...) to OSL_FAIL(...)

diff --git a/bridges/source/remote/urp/urp_reader.cxx b/bridges/source/remote/urp/urp_reader.cxx
index 6b55b21..fe75f8b 100644
--- a/bridges/source/remote/urp/urp_reader.cxx
+++ b/bridges/source/remote/urp/urp_reader.cxx
@@ -565,8 +565,7 @@ void OReaderThread::run()
                     TYPELIB_DANGER_RELEASE( pType );
                     if ( !ok )
                     {
-                        OSL_ENSURE(
-                            false,
+                        OSL_FAIL(
                             ("urp_bridge: error while unpacking current"
                              " context") );
                         disposeEnvironment();
diff --git a/cppu/source/typelib/typelib.cxx b/cppu/source/typelib/typelib.cxx
index 13232a5..ef9f6a7 100644
--- a/cppu/source/typelib/typelib.cxx
+++ b/cppu/source/typelib/typelib.cxx
@@ -1309,7 +1309,7 @@ extern "C" void SAL_CALL typelib_typedescription_newInterfaceMethod(
     sal_Int32 nOffset = rtl_ustr_lastIndexOfChar_WithLength(
         pTypeName->buffer, pTypeName->length, ':');
     if (nOffset <= 0 || pTypeName->buffer[nOffset - 1] != ':') {
-        OSL_ENSURE(false, "Bad interface method type name");
+        OSL_FAIL("Bad interface method type name");
         return;
     }
     rtl::OUString aInterfaceTypeName(pTypeName->buffer, nOffset - 1);
@@ -1322,7 +1322,7 @@ extern "C" void SAL_CALL typelib_typedescription_newInterfaceMethod(
         || !complete(
             reinterpret_cast< typelib_TypeDescription ** >(&pInterface), false))
     {
-        OSL_ENSURE(false, "No interface corresponding to interface method");
+        OSL_FAIL("No interface corresponding to interface method");
         return;
     }
 
@@ -1402,7 +1402,7 @@ extern "C" void SAL_CALL typelib_typedescription_newExtendedInterfaceAttribute(
     sal_Int32 nOffset = rtl_ustr_lastIndexOfChar_WithLength(
         pTypeName->buffer, pTypeName->length, ':');
     if (nOffset <= 0 || pTypeName->buffer[nOffset - 1] != ':') {
-        OSL_ENSURE(false, "Bad interface attribute type name");
+        OSL_FAIL("Bad interface attribute type name");
         return;
     }
     rtl::OUString aInterfaceTypeName(pTypeName->buffer, nOffset - 1);
@@ -1415,7 +1415,7 @@ extern "C" void SAL_CALL typelib_typedescription_newExtendedInterfaceAttribute(
         || !complete(
             reinterpret_cast< typelib_TypeDescription ** >(&pInterface), false))
     {
-        OSL_ENSURE(false, "No interface corresponding to interface attribute");
+        OSL_FAIL("No interface corresponding to interface attribute");
         return;
     }
 
diff --git a/cppuhelper/source/implbase.cxx b/cppuhelper/source/implbase.cxx
index 3765dba..8bac185 100644
--- a/cppuhelper/source/implbase.cxx
+++ b/cppuhelper/source/implbase.cxx
@@ -254,8 +254,8 @@ void WeakComponentImplHelperBase::release()
                 dispose();
             }
             catch (RuntimeException const& exc) { // don't break throw ()
-                OSL_ENSURE(
-                    false, OUStringToOString(
+                OSL_FAIL(
+                    OUStringToOString(
                         exc.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
                 static_cast<void>(exc);
             }
@@ -390,8 +390,8 @@ void WeakAggComponentImplHelperBase::release()
                 dispose();
             }
             catch (RuntimeException const& exc) { // don't break throw ()
-                OSL_ENSURE(
-                    false, OUStringToOString(
+                OSL_FAIL(
+                    OUStringToOString(
                         exc.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
                 static_cast<void>(exc);
             }
diff --git a/cppuhelper/source/propshlp.cxx b/cppuhelper/source/propshlp.cxx
index bbf1671..ffc91f2 100644
--- a/cppuhelper/source/propshlp.cxx
+++ b/cppuhelper/source/propshlp.cxx
@@ -1016,7 +1016,7 @@ void OPropertyArrayHelper::init( sal_Bool bSorted ) SAL_THROW( () )
         {
 #ifndef OS2 // YD disabled, too many troubles with debug builds!
             if (bSorted) {
-                OSL_ENSURE( false, "Property array is not sorted" );
+                OSL_FAIL( "Property array is not sorted" );
             }
 #endif
             // not sorted
diff --git a/cppuhelper/source/weak.cxx b/cppuhelper/source/weak.cxx
index 0224390..175e9b6 100644
--- a/cppuhelper/source/weak.cxx
+++ b/cppuhelper/source/weak.cxx
@@ -226,8 +226,8 @@ void OWeakObject::disposeWeakConnectionPoint()
             p->dispose();
         }
         catch (RuntimeException const& exc) {
-            OSL_ENSURE(
-                false, OUStringToOString(
+            OSL_FAIL(
+                OUStringToOString(
                     exc.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
             static_cast<void>(exc);
         }
diff --git a/jvmaccess/source/virtualmachine.cxx b/jvmaccess/source/virtualmachine.cxx
index 3cebecb..e4eff1d 100644
--- a/jvmaccess/source/virtualmachine.cxx
+++ b/jvmaccess/source/virtualmachine.cxx
@@ -100,7 +100,7 @@ JNIEnv * VirtualMachine::attachThread(bool * pAttached) const
     JNIEnv * pEnv;
     jint n = m_pVm->GetEnv(reinterpret_cast< void ** >(&pEnv), m_nVersion);
     if (n != JNI_OK && n != JNI_EDETACHED) {
-        OSL_ENSURE(false, "JNI: GetEnv failed");
+        OSL_FAIL("JNI: GetEnv failed");
     }
     if (pEnv == 0)
     {
@@ -119,7 +119,7 @@ void VirtualMachine::detachThread() const
 {
 #ifdef SOLAR_JAVA
     if (m_pVm->DetachCurrentThread() != JNI_OK) {
-        OSL_ENSURE(false, "JNI: DetachCurrentThread failed");
+        OSL_FAIL("JNI: DetachCurrentThread failed");
     }
 #endif
 }
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index c339c8c..b8eb60b 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -203,7 +203,7 @@ inline FileHandleGuard::~FileHandleGuard() SAL_THROW(())
     {
         if (osl_closeFile(m_rHandle) != osl_File_E_None)
         {
-            OSL_ENSURE(false, "unexpected situation");
+            OSL_FAIL("unexpected situation");
         }
     }
 }
diff --git a/remotebridges/source/factory/bridgefactory.cxx b/remotebridges/source/factory/bridgefactory.cxx
index e04027b..495cc13 100644
--- a/remotebridges/source/factory/bridgefactory.cxx
+++ b/remotebridges/source/factory/bridgefactory.cxx
@@ -230,7 +230,7 @@ namespace remotebridges_factory
         }
         catch (rtl::MalformedUriException &)
         {
-            OSL_ENSURE(false, "MalformedUriException");
+            OSL_FAIL("MalformedUriException");
         }
         ServiceHashMap::iterator ii = m_mapProtocolToService.find( sProtocolName );
         if( ii != m_mapProtocolToService.end() )
diff --git a/sal/qa/osl/socket/sockethelper.cxx b/sal/qa/osl/socket/sockethelper.cxx
index cbb88d0..91585e9 100644
--- a/sal/qa/osl/socket/sockethelper.cxx
+++ b/sal/qa/osl/socket/sockethelper.cxx
@@ -107,7 +107,7 @@ void printUString( const ::rtl::OUString & str,	const char* msg)
 #else
     char hostname[255];
     if (gethostname(hostname, 255) != 0) {
-        OSL_ENSURE( false, "#Error: gethostname failed."  );
+        OSL_FAIL( "#Error: gethostname failed."  );
     }
 
     struct hostent *hptr;
diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx
index 2e2fe51..54b6b45 100644
--- a/stoc/source/javavm/javavm.cxx
+++ b/stoc/source/javavm/javavm.cxx
@@ -643,7 +643,7 @@ extern "C" sal_Bool SAL_CALL component_writeInfo(void * pServiceManager,
         }
         catch (css::uno::Exception &)
         {
-            OSL_ENSURE(false, "com.sun.star.uno.Exception caught");
+            OSL_FAIL("com.sun.star.uno.Exception caught");
         }
     }
     return false;
@@ -1421,7 +1421,7 @@ JavaVirtualMachine::~JavaVirtualMachine()
         }
         catch (css::uno::Exception &)
         {
-            OSL_ENSURE(false, "com.sun.star.uno.Exception caught");
+            OSL_FAIL("com.sun.star.uno.Exception caught");
         }
     if (m_xJavaConfiguration.is())
         // We should never get here, but just in case...
@@ -1431,7 +1431,7 @@ JavaVirtualMachine::~JavaVirtualMachine()
         }
         catch (css::uno::Exception &)
         {
-            OSL_ENSURE(false, "com.sun.star.uno.Exception caught");
+            OSL_FAIL("com.sun.star.uno.Exception caught");
         }
 }
 
@@ -1658,12 +1658,11 @@ void JavaVirtualMachine::setINetSettingsInVM(bool set_reset)
     }
     catch (css::uno::RuntimeException &)
     {
-        OSL_ENSURE(false, "RuntimeException");
+        OSL_FAIL("RuntimeException");
     }
     catch (jvmaccess::VirtualMachine::AttachGuard::CreationException &)
     {
-        OSL_ENSURE(false,
-                   "jvmaccess::VirtualMachine::AttachGuard::CreationException");
+        OSL_FAIL("jvmaccess::VirtualMachine::AttachGuard::CreationException");
     }
 }
 


More information about the Libreoffice-commits mailing list