summaryrefslogtreecommitdiff
path: root/bridges
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2011-03-12 12:10:42 +0100
committerThomas Arnhold <thomas@arnhold.org>2011-03-12 14:19:48 +0100
commitadc6fe00e3ef3cca5bbd49a4633181856bf111df (patch)
treeea50caa8979aa23d77f912bee478d968ccf18232 /bridges
parent629b05ac304a47f70180d044ac5db18a9ecfc9cc (diff)
Move OSL_ENSURE(0,...) to OSL_FAIL(...)
Diffstat (limited to 'bridges')
-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
22 files changed, 57 insertions, 61 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;
}