summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bridges/inc/bridges/cpp_uno/bridge.hxx2
-rw-r--r--bridges/source/cpp_uno/cc50_solaris_intel/except.cxx2
-rw-r--r--bridges/source/cpp_uno/cc50_solaris_sparc/except.cxx2
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_arm/except.cxx4
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_hppa/except.cxx4
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_intel/except.cxx4
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_m68k/except.cxx4
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_mips/except.cxx4
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_sparc/except.cxx4
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx4
-rw-r--r--bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx4
-rw-r--r--bridges/source/cpp_uno/gcc3_os2_intel/except.cxx4
-rw-r--r--bridges/source/cpp_uno/gcc3_solaris_intel/except.cxx4
-rw-r--r--bridges/source/cpp_uno/gcc3_solaris_sparc/except.cxx4
-rw-r--r--bridges/source/cpp_uno/mingw_intel/except.cxx4
-rw-r--r--bridges/source/cpp_uno/shared/component.cxx4
-rw-r--r--bridges/source/jni_uno/jni_bridge.cxx15
-rw-r--r--bridges/source/jni_uno/jni_java2uno.cxx4
-rw-r--r--bridges/source/jni_uno/jni_uno2java.cxx7
-rw-r--r--bridges/source/remote/urp/urp_environment.cxx2
-rw-r--r--bridges/source/remote/urp/urp_propertyobject.cxx8
-rw-r--r--bridges/source/remote/urp/urp_reader.cxx24
-rw-r--r--cli_ure/source/climaker/climaker_app.cxx6
-rw-r--r--cli_ure/source/uno_bridge/cli_bridge.cxx6
-rw-r--r--cli_ure/source/uno_bridge/cli_proxy.cxx14
-rw-r--r--cppu/source/uno/copy.hxx4
-rw-r--r--cppu/source/uno/data.cxx2
-rw-r--r--cppu/source/uno/destr.hxx4
-rw-r--r--cppu/source/uno/sequence.cxx4
-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
-rw-r--r--io/test/testconnection.cxx16
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx2
-rw-r--r--jvmfwk/source/framework.cxx30
-rw-r--r--jvmfwk/source/fwkbase.cxx2
-rw-r--r--sal/cpprt/operators_new_delete.cxx2
-rw-r--r--sal/osl/os2/file.cxx2
-rw-r--r--sal/osl/os2/file_url.cxx2
-rw-r--r--sal/osl/unx/file_url.cxx8
-rw-r--r--sal/osl/w32/file_dirvol.cxx2
-rw-r--r--stoc/source/corereflection/crefl.cxx2
-rw-r--r--stoc/source/implementationregistration/implreg.cxx2
-rw-r--r--stoc/source/loader/dllcomponentloader.cxx2
-rw-r--r--stoc/source/security/access_controller.cxx4
-rw-r--r--stoc/source/servicemanager/servicemanager.cxx2
-rw-r--r--stoc/test/javavm/testjavavm.cxx2
50 files changed, 125 insertions, 129 deletions
diff --git a/bridges/inc/bridges/cpp_uno/bridge.hxx b/bridges/inc/bridges/cpp_uno/bridge.hxx
index 3c27ab056904..26bb101017c3 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 1af3b7ac1352..6a9b923a4e26 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 d0e8a4fc8bbb..84ce64ee1841 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 b7f44b2b5bb0..d8452d8db027 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 b810833d6434..1128f0f85cd8 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 c6529ed4f627..02ac42b1d4e7 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 b810833d6434..1128f0f85cd8 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 cc541fd02f27..f4c4e24c4374 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 a8dbc88730ce..f95848008920 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 fe4c19a3ca13..e841bc0c37e5 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 ff7b42d064ae..a14bc8b9aec0 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 58c04f7355fd..7fe668297078 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 d2607365a8bf..4779b145ab06 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 9a24607e593f..fef8c3facada 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 e76f15af03ad..5997c3b1ea2a 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 9f60e6671c49..f4f0a1988b56 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 8843e83f71ce..d15f05a814fd 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 8668cbcfa937..f4cc3f14e1c2 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 11f0748c7799..45e1fed44aec 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 f1a61896202b..c58fa56577b2 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 323faee2e929..7e115607d324 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 578cc7a7224c..4b9d3efa6d8a 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 d3380757d75e..907054c0b8bb 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 070e0a621873..6f6f16978864 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 85d5d1b3503b..df86686dd988 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 7750a686b694..eee6363e6998 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 ea0b8b2ad6b6..9e3e09a0e972 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 0dc28386afed..ce64f2d82e7f 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 947e803cb76a..6374c773cb86 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 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 >() );
}
diff --git a/io/test/testconnection.cxx b/io/test/testconnection.cxx
index dac0bd2cc127..7cedd87487e5 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 9025266571fd..75f0f973ac16 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 59f1942f13af..cd74131b24b2 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 e6856747f348..75400c8b8538 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 f48ce1269236..103e8f0d5914 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 2e2640378973..4a67b10fea23 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 966f31cecab0..426ee84b7f1f 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 7d6913a8d1a5..ab6c9d664811 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 95e68e6e1817..88cefe7d7eca 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 44655df15c5c..b625d705a183 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 01f4df8b3552..94be3f1670e7 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 1769ac5874f0..e326b980909f 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 816dd6868798..529899a53aae 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 664a5a82a90d..ce0d1b32adad 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 0329f785b046..f3ff52851e7c 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;
}