[Libreoffice-commits] .: cppuhelper/source cppuhelper/test cppu/source io/test remotebridges/examples sal/osl sal/test stoc/source stoc/test

Thomas Arnhold tarnhold at kemper.freedesktop.org
Sat Mar 19 06:12:32 PDT 2011


 cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx      |    2 
 cppu/source/typelib/typelib.cxx                          |    2 
 cppu/source/uno/destr.hxx                                |    2 
 cppuhelper/source/implbase.cxx                           |    2 
 cppuhelper/source/implementationentry.cxx                |    2 
 cppuhelper/source/propshlp.cxx                           |    4 -
 cppuhelper/test/testimplhelper.cxx                       |    4 -
 cppuhelper/test/testpropshlp.cxx                         |   42 +++++++--------
 io/test/stm/testfactreg.cxx                              |    2 
 remotebridges/examples/officeclient.cxx                  |    2 
 sal/osl/os2/file.cxx                                     |    2 
 sal/test/unloading/samplelib1.cxx                        |    2 
 sal/test/unloading/samplelib2.cxx                        |    2 
 stoc/source/corereflection/crbase.cxx                    |    6 +-
 stoc/source/implementationregistration/implreg.cxx       |    2 
 stoc/source/inspect/introspection.cxx                    |    5 -
 stoc/source/registry_tdprovider/base.hxx                 |    4 -
 stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx |   33 +++--------
 stoc/source/registry_tdprovider/tdmodule.cxx             |    3 -
 stoc/source/registry_tdprovider/tdprovider.cxx           |    7 +-
 stoc/source/registry_tdprovider/tdservice.cxx            |    2 
 stoc/source/servicemanager/servicemanager.cxx            |    4 -
 stoc/source/tdmanager/tdmgr_tdenumeration.cxx            |    6 --
 stoc/test/excomp/excomp1.cxx                             |    2 
 stoc/test/excomp/excomp2.cxx                             |    2 
 stoc/test/javavm/testjavavm.cxx                          |    2 
 stoc/test/testconv.cxx                                   |    2 
 stoc/test/testcorefl.cxx                                 |    2 
 stoc/test/testiadapter.cxx                               |    4 -
 stoc/test/testintrosp.cxx                                |    2 
 stoc/test/testsmgr_cpnt.cxx                              |    2 
 31 files changed, 72 insertions(+), 88 deletions(-)

New commits:
commit 7f5ce2bde679d1a512a631eea7909727eba1554f
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Sat Mar 19 14:12:37 2011 +0100

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

diff --git a/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx b/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx
index 554cee1..5009099 100644
--- a/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx
+++ b/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx
@@ -172,7 +172,7 @@ extern "C" { static void SAL_CALL s_Proxy_dispatch(
         break;
     }
     default:
-        OSL_ENSURE( sal_False, "### illegal member typeclass!" );
+        OSL_FAIL( "### illegal member typeclass!" );
         abort();
     }
 
diff --git a/cppu/source/typelib/typelib.cxx b/cppu/source/typelib/typelib.cxx
index 4f0bdef..e8d4a24 100644
--- a/cppu/source/typelib/typelib.cxx
+++ b/cppu/source/typelib/typelib.cxx
@@ -1986,7 +1986,7 @@ extern "C" sal_Int32 SAL_CALL typelib_typedescription_getAlignedUnoSize(
             case typelib_TypeClass_SERVICE:
             case typelib_TypeClass_MODULE:
             default:
-                OSL_ENSURE( sal_False, "not convertable type" );
+                OSL_FAIL( "not convertable type" );
         };
     }
 
diff --git a/cppu/source/uno/destr.hxx b/cppu/source/uno/destr.hxx
index 0504325..d416062 100644
--- a/cppu/source/uno/destr.hxx
+++ b/cppu/source/uno/destr.hxx
@@ -147,7 +147,7 @@ inline void _destructAny(
             (typelib_TypeDescriptionReference *)pAny->pReserved );
         break;
     case typelib_TypeClass_ANY:
-        OSL_ENSURE( sal_False, "### unexpected nested any!" );
+        OSL_FAIL( "### unexpected nested any!" );
         ::uno_any_destruct( (uno_Any *)pAny->pData, release );
         ::rtl_freeMemory( pAny->pData );
         break;
diff --git a/cppuhelper/source/implbase.cxx b/cppuhelper/source/implbase.cxx
index 8bac185..c2b481f 100644
--- a/cppuhelper/source/implbase.cxx
+++ b/cppuhelper/source/implbase.cxx
@@ -108,7 +108,7 @@ void ClassData::writeTypeOffset( const Type & rType, sal_Int32 nOffset ) SAL_THR
     {
         OString msg( "### cannot get type description for " );
         msg += OUStringToOString( rType.getTypeName(), RTL_TEXTENCODING_ASCII_US );
-        OSL_ENSURE( sal_False, msg.getStr() );
+        OSL_FAIL( msg.getStr() );
     }
 #endif
 }
diff --git a/cppuhelper/source/implementationentry.cxx b/cppuhelper/source/implementationentry.cxx
index 0c870d8..a8f6eb9 100644
--- a/cppuhelper/source/implementationentry.cxx
+++ b/cppuhelper/source/implementationentry.cxx
@@ -65,7 +65,7 @@ sal_Bool component_writeInfoHelper(
     }
     catch ( InvalidRegistryException & )
     {
-        OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
+        OSL_FAIL( "### InvalidRegistryException!" );
     }
     return bRet;
 }
diff --git a/cppuhelper/source/propshlp.cxx b/cppuhelper/source/propshlp.cxx
index bab3555..596d401 100644
--- a/cppuhelper/source/propshlp.cxx
+++ b/cppuhelper/source/propshlp.cxx
@@ -308,7 +308,7 @@ void OPropertySetHelper::addPropertyChangeListener(
             rPH.fillPropertyMembersByHandle( NULL, &nAttributes, nHandle );
             if( !(nAttributes & ::com::sun::star::beans::PropertyAttribute::BOUND) )
             {
-                OSL_ENSURE( sal_False, "add listener to an unbound property" );
+                OSL_FAIL( "add listener to an unbound property" );
                 // silent ignore this
                 return;
             }
@@ -390,7 +390,7 @@ void OPropertySetHelper::addVetoableChangeListener(
             rPH.fillPropertyMembersByHandle( NULL, &nAttributes, nHandle );
             if( !(nAttributes & PropertyAttribute::CONSTRAINED) )
             {
-                OSL_ENSURE( sal_False, "addVetoableChangeListener, and property is not constrained" );
+                OSL_FAIL( "addVetoableChangeListener, and property is not constrained" );
                 // silent ignore this
                 return;
             }
diff --git a/cppuhelper/test/testimplhelper.cxx b/cppuhelper/test/testimplhelper.cxx
index c70c933..19b05e9 100644
--- a/cppuhelper/test/testimplhelper.cxx
+++ b/cppuhelper/test/testimplhelper.cxx
@@ -558,7 +558,7 @@ void test_ImplHelper( const Reference< lang::XMultiServiceFactory > & /*xSF*/ )
         }
         catch (lang::IllegalAccessException &)
         {
-            OSL_ENSURE( sal_False, "### unexpected IllegalAccessException exception caught!" );
+            OSL_FAIL( "### unexpected IllegalAccessException exception caught!" );
         }
         catch (Exception & rExc2)
         {
@@ -580,7 +580,7 @@ void test_ImplHelper( const Reference< lang::XMultiServiceFactory > & /*xSF*/ )
     catch (...)
     {
     }
-    OSL_ENSURE( sal_False, "### exception test failed!" );
+    OSL_FAIL( "### exception test failed!" );
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cppuhelper/test/testpropshlp.cxx b/cppuhelper/test/testpropshlp.cxx
index d9f29ed..63b9f4a 100644
--- a/cppuhelper/test/testpropshlp.cxx
+++ b/cppuhelper/test/testpropshlp.cxx
@@ -240,7 +240,7 @@ void test_PropertyArrayHelper()
         try
         {
             a1.getPropertyByName( OUString( RTL_CONSTASCII_USTRINGPARAM("never exist") ) );
-            OSL_ENSURE( sal_False, "exeption not thrown" );
+            OSL_FAIL( "exeption not thrown" );
         }
         catch( UnknownPropertyException & )
         {
@@ -483,7 +483,7 @@ public:
         {
             case PROPERTY_BOOL:
                 {
-                OSL_ENSURE( sal_False			, "PropertySetHelper: BOOL cannot change" );
+                OSL_FAIL( "PropertySetHelper: BOOL cannot change" );
                 OSL_ENSURE( evt.PropertyName == OUString( RTL_CONSTASCII_USTRINGPARAM("BOOL") ), "PropertySetHelper: wrong name" );
                 }
             break;
@@ -524,7 +524,7 @@ public:
             break;
 
             default:
-                OSL_ENSURE( sal_False, "XPropeSetHelper: invalid property handle" );
+                OSL_FAIL( "XPropeSetHelper: invalid property handle" );
         }
         nCurrent += 2;
     }
@@ -541,7 +541,7 @@ public:
         {
             case PROPERTY_BOOL:
                 {
-                    OSL_ENSURE( sal_False	, "PropertySetHelper: BOOL cannot change" );
+                    OSL_FAIL( "PropertySetHelper: BOOL cannot change" );
                     OSL_ENSURE( evt.PropertyName == OUString( RTL_CONSTASCII_USTRINGPARAM("BOOL") ), "PropertySetHelper: wrong name" );
                 }
             break;
@@ -584,7 +584,7 @@ public:
             break;
 
             default:
-                OSL_ENSURE( sal_False, "XPropeSetHelper: invalid property handle" );
+                OSL_FAIL( "XPropeSetHelper: invalid property handle" );
         }
         nCurrent += 2;
     }
@@ -604,7 +604,7 @@ public:
             {
                 case PROPERTY_BOOL:
                     {
-                    OSL_ENSURE( sal_False, "PropertySetHelper: BOOL cannot change" );
+                    OSL_FAIL( "PropertySetHelper: BOOL cannot change" );
                     OSL_ENSURE( evt.PropertyName == OUString( RTL_CONSTASCII_USTRINGPARAM("BOOL") ), "PropertySetHelper: wrong name" );
                     }
                 break;
@@ -642,7 +642,7 @@ public:
                 break;
 
                 default:
-                    OSL_ENSURE( sal_False, "XPropeSetHelper: invalid property handle" );
+                    OSL_FAIL( "XPropeSetHelper: invalid property handle" );
             }
             nCurrent += 2;
         }
@@ -840,7 +840,7 @@ void test_PropertySetHelper()
             try
             {
                 xPS->addPropertyChangeListener( OUString( RTL_CONSTASCII_USTRINGPARAM("Does not exist") ), xPS_L );
-                OSL_ENSURE( sal_False, "PropertySetHelper: exeption not thrown" );
+                OSL_FAIL( "PropertySetHelper: exeption not thrown" );
             }
             catch( UnknownPropertyException & /*e*/ )
             {
@@ -850,7 +850,7 @@ void test_PropertySetHelper()
             try
             {
                 xPS->addVetoableChangeListener( OUString( RTL_CONSTASCII_USTRINGPARAM("Does not exist") ), x2 );
-                OSL_ENSURE( sal_False, "PropertySetHelper: exeption not thrown" );
+                OSL_FAIL( "PropertySetHelper: exeption not thrown" );
             }
             catch( UnknownPropertyException & /*e*/ )
             {
@@ -890,7 +890,7 @@ void test_PropertySetHelper()
                 Any aBool;
                 aBool.setValue( &b , getCppuBooleanType() );
                 xPS->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("BOOL") ), aBool );
-                OSL_ENSURE( sal_False, "PropertySetHelper: exeption not thrown" );
+                OSL_FAIL( "PropertySetHelper: exeption not thrown" );
             }
             catch( PropertyVetoException & /*e*/ )
             {
@@ -904,7 +904,7 @@ void test_PropertySetHelper()
                 aBool.setValue( &b , getCppuBooleanType() );
                 // BOOL i s0
                 pPS->setFastPropertyValue( PROPERTY_BOOL, aBool );
-                OSL_ENSURE( sal_False, "PropertySetHelper: exeption not thrown" );
+                OSL_FAIL( "PropertySetHelper: exeption not thrown" );
             }
             catch( PropertyVetoException & /*e*/ )
             {
@@ -917,7 +917,7 @@ void test_PropertySetHelper()
                 Any aBool;
                 aBool.setValue( &b , getCppuBooleanType() );
                 xPS->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("Does not exist") ), aBool );
-                OSL_ENSURE( sal_False, "PropertySetHelper: exeption not thrown" );
+                OSL_FAIL( "PropertySetHelper: exeption not thrown" );
             }
             catch( UnknownPropertyException & /*e*/ )
             {
@@ -929,7 +929,7 @@ void test_PropertySetHelper()
                 Any aBool;
                 aBool.setValue( &b , getCppuBooleanType() );
                 pPS->setFastPropertyValue( 3, aBool );
-                OSL_ENSURE( sal_False, "PropertySetHelper: exeption not thrown" );
+                OSL_FAIL( "PropertySetHelper: exeption not thrown" );
             }
             catch( UnknownPropertyException & /*e*/ )
             {
@@ -940,7 +940,7 @@ void test_PropertySetHelper()
             {
                 Any aBool;
                 aBool = xPS->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("Does not exist") ) );
-                OSL_ENSURE( sal_False, "PropertySetHelper: exeption not thrown" );
+                OSL_FAIL( "PropertySetHelper: exeption not thrown" );
             }
             catch( UnknownPropertyException & /*e*/ )
             {
@@ -950,7 +950,7 @@ void test_PropertySetHelper()
             {
                 Any aBool;
                 aBool = ((XFastPropertySet *)pPS)->getFastPropertyValue( 3 );
-                OSL_ENSURE( sal_False, "PropertySetHelper: exeption not thrown" );
+                OSL_FAIL( "PropertySetHelper: exeption not thrown" );
             }
             catch( UnknownPropertyException & /*e*/ )
             {
@@ -961,7 +961,7 @@ void test_PropertySetHelper()
             {
                 Any aBool;
                 xPS->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("INT32") ), aBool );
-                OSL_ENSURE( sal_False, "PropertySetHelper: exeption not thrown" );
+                OSL_FAIL( "PropertySetHelper: exeption not thrown" );
             }
             catch( IllegalArgumentException & /*e*/ )
             {
@@ -971,7 +971,7 @@ void test_PropertySetHelper()
             {
                 Any aBool;
                 pPS->setFastPropertyValue( PROPERTY_INT32, aBool );
-                OSL_ENSURE( sal_False, "PropertySetHelper: exeption not thrown" );
+                OSL_FAIL( "PropertySetHelper: exeption not thrown" );
             }
             catch( IllegalArgumentException & /*e*/ )
             {
@@ -983,7 +983,7 @@ void test_PropertySetHelper()
                 Any aINT32;
                 aINT32 <<= (sal_Int32 ) 16;
                 xPS->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") ), aINT32 );
-                OSL_ENSURE( sal_False, "PropertySetHelper: exeption not thrown" );
+                OSL_FAIL( "PropertySetHelper: exeption not thrown" );
             }
             catch( IllegalArgumentException & /*e*/ )
             {
@@ -995,7 +995,7 @@ void test_PropertySetHelper()
                 Any aINT32;
                 aINT32 <<= (sal_Int32) 16;
                 pPS->setFastPropertyValue( PROPERTY_INT16, aINT32 );
-                OSL_ENSURE( sal_False, "PropertySetHelper: exeption not thrown" );
+                OSL_FAIL( "PropertySetHelper: exeption not thrown" );
             }
             catch( IllegalArgumentException & /*e*/ )
             {
@@ -1088,7 +1088,7 @@ void test_PropertySetHelper()
             try
             {
                 ((XFastPropertySet *)pPS)->setFastPropertyValue( PROPERTY_INT16, aValue );
-                OSL_ENSURE( sal_False, "PropertySetHelper: exeption not thrown" );
+                OSL_FAIL( "PropertySetHelper: exeption not thrown" );
             }
             catch( PropertyVetoException & /*e*/ )
             {
@@ -1168,7 +1168,7 @@ void test_PropertySetHelper()
                 aValues.getArray()[0] <<= (sal_Int16)44;
                 aValues.getArray()[1] <<= (sal_Int16)100;
                 pPS->setPropertyValues( szPN, aValues );
-                OSL_ENSURE( sal_False, "PropertySetHelper: exeption not thrown" );
+                OSL_FAIL( "PropertySetHelper: exeption not thrown" );
             }
             catch ( PropertyVetoException & /*e*/ )
             {
diff --git a/io/test/stm/testfactreg.cxx b/io/test/stm/testfactreg.cxx
index 4cd7c1d..99f0b96 100644
--- a/io/test/stm/testfactreg.cxx
+++ b/io/test/stm/testfactreg.cxx
@@ -122,7 +122,7 @@ sal_Bool SAL_CALL component_writeInfo(
         }
         catch (InvalidRegistryException &)
         {
-            OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
+            OSL_FAIL( "### InvalidRegistryException!" );
         }
     }
     return sal_False;
diff --git a/remotebridges/examples/officeclient.cxx b/remotebridges/examples/officeclient.cxx
index 459f788..25e1611 100644
--- a/remotebridges/examples/officeclient.cxx
+++ b/remotebridges/examples/officeclient.cxx
@@ -304,7 +304,7 @@ sal_Bool SAL_CALL component_writeInfo(
         }
         catch (InvalidRegistryException &)
         {
-            OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
+            OSL_FAIL( "### InvalidRegistryException!" );
         }
     }
     return sal_False;
diff --git a/sal/osl/os2/file.cxx b/sal/osl/os2/file.cxx
index 571557f..60a4951 100644
--- a/sal/osl/os2/file.cxx
+++ b/sal/osl/os2/file.cxx
@@ -1948,7 +1948,7 @@ oslFileError SAL_CALL osl_createDirectoryPath(
 
 oslFileError osl_getCanonicalName( rtl_uString* ustrFileURL, rtl_uString** pustrValidURL )
 {
-    OSL_ENSURE(sal_False, "osl_getCanonicalName not implemented");
+    OSL_FAIL("osl_getCanonicalName not implemented");
 
     rtl_uString_newFromString(pustrValidURL, ustrFileURL);
     return osl_File_E_None;
diff --git a/sal/test/unloading/samplelib1.cxx b/sal/test/unloading/samplelib1.cxx
index 333e97c..5761e0b 100644
--- a/sal/test/unloading/samplelib1.cxx
+++ b/sal/test/unloading/samplelib1.cxx
@@ -172,7 +172,7 @@ extern "C" {
             }
             catch (InvalidRegistryException &)
             {
-                OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
+                OSL_FAIL( "### InvalidRegistryException!" );
             }
         }
         return sal_False;
diff --git a/sal/test/unloading/samplelib2.cxx b/sal/test/unloading/samplelib2.cxx
index ea08cb6..169990b 100644
--- a/sal/test/unloading/samplelib2.cxx
+++ b/sal/test/unloading/samplelib2.cxx
@@ -157,7 +157,7 @@ extern "C" {
             }
             catch (InvalidRegistryException &)
             {
-                OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
+                OSL_FAIL( "### InvalidRegistryException!" );
             }
         }
         return sal_False;
diff --git a/stoc/source/corereflection/crbase.cxx b/stoc/source/corereflection/crbase.cxx
index adb1b62..874e1c2 100644
--- a/stoc/source/corereflection/crbase.cxx
+++ b/stoc/source/corereflection/crbase.cxx
@@ -165,21 +165,21 @@ void IdlClassImpl::createObject( Any & rObj )
 Sequence< Reference< XIdlClass > > IdlClassImpl::getClasses()
     throw(::com::sun::star::uno::RuntimeException)
 {
-    OSL_ENSURE( sal_False, "### unexpected use!" );
+    OSL_FAIL( "### unexpected use!" );
     return Sequence< Reference< XIdlClass > >();
 }
 //__________________________________________________________________________________________________
 Reference< XIdlClass > IdlClassImpl::getClass( const OUString & )
     throw(::com::sun::star::uno::RuntimeException)
 {
-    OSL_ENSURE( sal_False, "### unexpected use!" );
+    OSL_FAIL( "### unexpected use!" );
     return Reference< XIdlClass >();
 }
 //__________________________________________________________________________________________________
 Sequence< Reference< XIdlClass > > IdlClassImpl::getInterfaces()
     throw(::com::sun::star::uno::RuntimeException)
 {
-//  	OSL_ENSURE( sal_False, "### unexpected use!" );
+//  	OSL_FAIL( "### unexpected use!" );
     return Sequence< Reference< XIdlClass > >();
 }
 
diff --git a/stoc/source/implementationregistration/implreg.cxx b/stoc/source/implementationregistration/implreg.cxx
index b1e69b8..d9ff9ec 100644
--- a/stoc/source/implementationregistration/implreg.cxx
+++ b/stoc/source/implementationregistration/implreg.cxx
@@ -1759,7 +1759,7 @@ Sequence< OUString > ImplementationRegistration::getImplementations(
 Sequence< OUString > ImplementationRegistration::checkInstantiation(const OUString&) 
     throw ( RuntimeException )
 {
-    OSL_ENSURE( sal_False, "ImplementationRegistration::checkInstantiation not implemented" );
+    OSL_FAIL( "ImplementationRegistration::checkInstantiation not implemented" );
     return Sequence<OUString>();	
 }
 
diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx
index e7a503e..ba170a1 100644
--- a/stoc/source/inspect/introspection.cxx
+++ b/stoc/source/inspect/introspection.cxx
@@ -2306,8 +2306,7 @@ IntrospectionAccessStatic_Impl* ImplIntrospection::implInspect(const Any& aToIns
                 }
                 else
                 {
-                    OSL_ENSURE( sal_False, 
-                        OString( "Introspection: Property \"" ) + 
+                    OSL_FAIL( OString( "Introspection: Property \"" ) +
                         OUStringToOString( aPropName, RTL_TEXTENCODING_ASCII_US ) +
                         OString( "\" found more than once in PropertySet" ) );
                 }
@@ -2975,7 +2974,7 @@ IntrospectionAccessStatic_Impl* ImplIntrospection::implInspect(const Any& aToIns
         Reference<XIdlClass> xClassRef = TypeToIdlClass( aToInspectObj.getValueType(), m_xSMgr );
         if( !xClassRef.is() )
         {
-            OSL_ENSURE( sal_False, "Can't get XIdlClass from Reflection" );
+            OSL_FAIL( "Can't get XIdlClass from Reflection" );
             return pAccess;
         }
 
diff --git a/stoc/source/registry_tdprovider/base.hxx b/stoc/source/registry_tdprovider/base.hxx
index 59c59a3..a2669cc 100644
--- a/stoc/source/registry_tdprovider/base.hxx
+++ b/stoc/source/registry_tdprovider/base.hxx
@@ -135,7 +135,7 @@ inline sal_Int32 getRTValueAsInt32( const RTConstValue & rVal )
     case RT_TYPE_UINT32:
         return rVal.m_value.aULong;
     default:
-        OSL_ENSURE( sal_False, "### unexpected value type!" );
+        OSL_FAIL( "### unexpected value type!" );
         return 0;
     }
 }
@@ -170,7 +170,7 @@ inline Any getRTValue( const RTConstValue & rVal )
         return Any( &aStr, ::getCppuType( (const OUString *)0 ) );
     }
     default:
-        OSL_ENSURE( sal_False, "### unexpected RTValue!" );
+        OSL_FAIL( "### unexpected RTValue!" );
         return Any();
     }
 }
diff --git a/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx b/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx
index f59e54b..da20d04 100644
--- a/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx
+++ b/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx
@@ -153,8 +153,7 @@ TypeDescriptionEnumerationImpl::createInstance(
                 }
                 else
                 {
-                    OSL_ENSURE(
-                        sal_False,
+                    OSL_FAIL(
                         "TypeDescriptionEnumerationImpl::createInstance "
                         "- Invalid registry key!" );
                 }
@@ -164,8 +163,7 @@ TypeDescriptionEnumerationImpl::createInstance(
         {
             // openKey, getValueType, getBinaryValue
 
-            OSL_ENSURE( sal_False,
-                        "TypeDescriptionEnumerationImpl::createInstance "
+            OSL_FAIL( "TypeDescriptionEnumerationImpl::createInstance "
                         "- Caught InvalidRegistryException!" );
         }
 
@@ -218,8 +216,7 @@ TypeDescriptionEnumerationImpl::~TypeDescriptionEnumerationImpl()
         catch (...)
         {
             // No exceptions from dtors, please!
-            OSL_ENSURE( sal_False,
-            "TypeDescriptionEnumerationImpl::~TypeDescriptionEnumerationImpl "
+            OSL_FAIL( "TypeDescriptionEnumerationImpl::~TypeDescriptionEnumerationImpl "
             "- Caught exception!" );
         }
 
@@ -238,8 +235,7 @@ TypeDescriptionEnumerationImpl::~TypeDescriptionEnumerationImpl()
         catch (Exception &)
         {
             // No exceptions from dtors, please!
-            OSL_ENSURE( sal_False,
-            "TypeDescriptionEnumerationImpl::~TypeDescriptionEnumerationImpl "
+            OSL_FAIL( "TypeDescriptionEnumerationImpl::~TypeDescriptionEnumerationImpl "
             "- Caught exception!" );
         }
 
@@ -435,8 +431,7 @@ bool TypeDescriptionEnumerationImpl::queryMore()
                     }
                     else
                     {
-                        OSL_ENSURE( sal_False,
-                            "TypeDescriptionEnumerationImpl::queryMore "
+                        OSL_FAIL( "TypeDescriptionEnumerationImpl::queryMore "
                             "- Invalid registry key!" );
                     }
 
@@ -445,8 +440,7 @@ bool TypeDescriptionEnumerationImpl::queryMore()
                 {
                     // getValueType, getBinaryValue
 
-                    OSL_ENSURE( sal_False,
-                                "TypeDescriptionEnumerationImpl::queryMore "
+                    OSL_FAIL( "TypeDescriptionEnumerationImpl::queryMore "
                                 "- Caught InvalidRegistryException!" );
 
                     // Don't stop iterating!
@@ -465,8 +459,7 @@ bool TypeDescriptionEnumerationImpl::queryMore()
                 }
                 catch ( registry::InvalidRegistryException const & )
                 {
-                    OSL_ENSURE( sal_False,
-                                "TypeDescriptionEnumerationImpl::queryMore "
+                    OSL_FAIL( "TypeDescriptionEnumerationImpl::queryMore "
                                 "- Caught InvalidRegistryException!" );
                 }
             }
@@ -532,8 +525,7 @@ bool TypeDescriptionEnumerationImpl::queryMore()
                 {
                     // getBinaryValue
 
-                    OSL_ENSURE( sal_False,
-                                "TypeDescriptionEnumerationImpl::queryMore "
+                    OSL_FAIL( "TypeDescriptionEnumerationImpl::queryMore "
                                 "- Caught InvalidRegistryException!" );
                 }
             }
@@ -551,8 +543,7 @@ bool TypeDescriptionEnumerationImpl::queryMore()
         }
         catch ( registry::InvalidRegistryException const & )
         {
-            OSL_ENSURE( sal_False,
-                        "TypeDescriptionEnumerationImpl::queryMore "
+            OSL_FAIL( "TypeDescriptionEnumerationImpl::queryMore "
                         "- Caught InvalidRegistryException!" );
         }
 */
@@ -614,8 +605,7 @@ TypeDescriptionEnumerationImpl::queryNext()
                 }
                 else
                 {
-                    OSL_ENSURE( sal_False,
-                        "TypeDescriptionEnumerationImpl::queryNext "
+                    OSL_FAIL( "TypeDescriptionEnumerationImpl::queryNext "
                         "- Invalid registry key!" );
                 }
             }
@@ -624,8 +614,7 @@ TypeDescriptionEnumerationImpl::queryNext()
         {
             // getValueType, getBinaryValue
 
-            OSL_ENSURE( sal_False,
-                        "TypeDescriptionEnumerationImpl::queryNext "
+            OSL_FAIL( "TypeDescriptionEnumerationImpl::queryNext "
                         "- Caught InvalidRegistryException!" );
         }
 
diff --git a/stoc/source/registry_tdprovider/tdmodule.cxx b/stoc/source/registry_tdprovider/tdmodule.cxx
index 2335df9..434c077 100644
--- a/stoc/source/registry_tdprovider/tdmodule.cxx
+++ b/stoc/source/registry_tdprovider/tdmodule.cxx
@@ -99,8 +99,7 @@ ModuleTypeDescriptionImpl::getMembers()
             }
             catch ( NoSuchElementException const & )
             {
-                OSL_ENSURE( sal_False,
-                    "ModuleTypeDescriptionImpl::getMembers - "
+                OSL_FAIL( "ModuleTypeDescriptionImpl::getMembers - "
                     " Caught NoSuchElementException!" );
             }
         }
diff --git a/stoc/source/registry_tdprovider/tdprovider.cxx b/stoc/source/registry_tdprovider/tdprovider.cxx
index 27614ec..0f79081 100644
--- a/stoc/source/registry_tdprovider/tdprovider.cxx
+++ b/stoc/source/registry_tdprovider/tdprovider.cxx
@@ -419,8 +419,7 @@ Any ProviderImpl::getByHierarchicalNameImpl( const OUString & rName )
         }
         catch ( InvalidRegistryException const & )
         {
-            OSL_ENSURE( sal_False,
-                        "ProviderImpl::getByHierarchicalName "
+            OSL_FAIL( "ProviderImpl::getByHierarchicalName "
                         "- Caught InvalidRegistryException!" );
 
             // openKey, closeKey, getValueType, getBinaryValue, isValid
@@ -599,11 +598,11 @@ com::sun::star::uno::Reference< XTypeDescription > createTypeDescription(
         case RT_TYPE_INVALID:
         case RT_TYPE_OBJECT:      // deprecated and not used
         case RT_TYPE_UNION:       // deprecated and not used
-            OSL_ENSURE( sal_False, "createTypeDescription - Unsupported Type!" );
+            OSL_FAIL( "createTypeDescription - Unsupported Type!" );
             break;
 
         default:
-            OSL_ENSURE( sal_False, "createTypeDescription - Unknown Type!" );
+            OSL_FAIL( "createTypeDescription - Unknown Type!" );
             break;
     }
 
diff --git a/stoc/source/registry_tdprovider/tdservice.cxx b/stoc/source/registry_tdprovider/tdservice.cxx
index 458b1f1..031f1a2 100644
--- a/stoc/source/registry_tdprovider/tdservice.cxx
+++ b/stoc/source/registry_tdprovider/tdservice.cxx
@@ -543,7 +543,7 @@ void ServiceTypeDescriptionImpl::getReferences()
             case RT_REF_NEEDS:
                 break;
             default:
-                OSL_ENSURE( sal_False, "### unsupported reference type!" );
+                OSL_FAIL( "### unsupported reference type!" );
                 break;
             }
         }
diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx
index d617f38..3dd3148 100644
--- a/stoc/source/servicemanager/servicemanager.cxx
+++ b/stoc/source/servicemanager/servicemanager.cxx
@@ -506,11 +506,11 @@ void OServiceManager_Listener::disposing(const EventObject & rEvt )
         }
         catch( const IllegalArgumentException & )
         {
-            OSL_ENSURE( sal_False, "IllegalArgumentException catched" );
+            OSL_FAIL( "IllegalArgumentException catched" );
         }
         catch( const NoSuchElementException & )
         {
-            OSL_ENSURE( sal_False, "NoSuchElementException catched" );
+            OSL_FAIL( "NoSuchElementException catched" );
         }
     }
 }
diff --git a/stoc/source/tdmanager/tdmgr_tdenumeration.cxx b/stoc/source/tdmanager/tdmgr_tdenumeration.cxx
index 39f1045..e0ea146 100644
--- a/stoc/source/tdmanager/tdmgr_tdenumeration.cxx
+++ b/stoc/source/tdmanager/tdmgr_tdenumeration.cxx
@@ -164,14 +164,12 @@ TypeDescriptionEnumerationImpl::queryCurrentChildEnumeration()
         }
         catch ( reflection::NoSuchTypeNameException const & )
         {
-            OSL_ENSURE( sal_False,
-               "TypeDescriptionEnumerationImpl::queryCurrentChildEnumeration "
+            OSL_FAIL( "TypeDescriptionEnumerationImpl::queryCurrentChildEnumeration "
                "- Caught NoSuchTypeNameException!" );
         }
         catch ( reflection::InvalidTypeNameException const & )
         {
-            OSL_ENSURE( sal_False,
-               "TypeDescriptionEnumerationImpl::queryCurrentChildEnumeration "
+            OSL_FAIL( "TypeDescriptionEnumerationImpl::queryCurrentChildEnumeration "
                "- Caught InvalidTypeNameException!" );
         }
 
diff --git a/stoc/test/excomp/excomp1.cxx b/stoc/test/excomp/excomp1.cxx
index 05d4a21..bcc985a 100644
--- a/stoc/test/excomp/excomp1.cxx
+++ b/stoc/test/excomp/excomp1.cxx
@@ -183,7 +183,7 @@ sal_Bool SAL_CALL component_writeInfo(
         }
         catch (InvalidRegistryException &)
         {
-            OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
+            OSL_FAIL( "### InvalidRegistryException!" );
         }
     }
     return sal_False;
diff --git a/stoc/test/excomp/excomp2.cxx b/stoc/test/excomp/excomp2.cxx
index b059f67..907fd2a 100644
--- a/stoc/test/excomp/excomp2.cxx
+++ b/stoc/test/excomp/excomp2.cxx
@@ -254,7 +254,7 @@ sal_Bool SAL_CALL component_writeInfo(
         }
         catch (InvalidRegistryException &)
         {
-            OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
+            OSL_FAIL( "### InvalidRegistryException!" );
         }
     }
     return sal_False;
diff --git a/stoc/test/javavm/testjavavm.cxx b/stoc/test/javavm/testjavavm.cxx
index 236cd40..21ec816 100644
--- a/stoc/test/javavm/testjavavm.cxx
+++ b/stoc/test/javavm/testjavavm.cxx
@@ -155,7 +155,7 @@ SAL_IMPLEMENT_MAIN()
     }
     catch (Exception & rExc)
     {
-        OSL_ENSURE( sal_False, "### exception occurred!" );
+        OSL_FAIL( "### exception occurred!" );
         OString aMsg( OUStringToOString( rExc.Message, RTL_TEXTENCODING_ASCII_US ) );
         OSL_TRACE( "### exception occurred: " );
         OSL_TRACE( "%s", aMsg.getStr() );
diff --git a/stoc/test/testconv.cxx b/stoc/test/testconv.cxx
index 083603e..aee32df 100644
--- a/stoc/test/testconv.cxx
+++ b/stoc/test/testconv.cxx
@@ -696,7 +696,7 @@ SAL_IMPLEMENT_MAIN()
     }
     catch (Exception & rExc)
     {
-        OSL_ENSURE( sal_False, "### exception occurred!" );
+        OSL_FAIL( "### exception occurred!" );
         OString aMsg( OUStringToOString( rExc.Message, RTL_TEXTENCODING_ASCII_US ) );
         OSL_TRACE( "### exception occurred: " );
         OSL_TRACE( "%s", aMsg.getStr() );
diff --git a/stoc/test/testcorefl.cxx b/stoc/test/testcorefl.cxx
index bd4924b..551414e 100644
--- a/stoc/test/testcorefl.cxx
+++ b/stoc/test/testcorefl.cxx
@@ -403,7 +403,7 @@ SAL_IMPLEMENT_MAIN()
     }
     catch (Exception & rExc)
     {
-        OSL_ENSURE( sal_False, "### exception occurred!" );
+        OSL_FAIL( "### exception occurred!" );
         OString aMsg(
             OUStringToOString( rExc.Message, RTL_TEXTENCODING_ASCII_US ) );
         OSL_TRACE( "### exception occurred: " );
diff --git a/stoc/test/testiadapter.cxx b/stoc/test/testiadapter.cxx
index 8813a2f..971ca11 100644
--- a/stoc/test/testiadapter.cxx
+++ b/stoc/test/testiadapter.cxx
@@ -116,7 +116,7 @@ sal_Bool equals( const test::TestData & rData1, const test::TestData & rData2 )
         {
             if (! equals( pElements1[nLen], pElements2[nLen] ))
             {
-                OSL_ENSURE( sal_False, "### sequence element did not match!" );
+                OSL_FAIL( "### sequence element did not match!" );
                 return sal_False;
             }
         }
@@ -541,7 +541,7 @@ Any XLB_Invocation::invoke( const OUString & rFunctionName,
     }
     catch (Exception &)
     {
-        OSL_ENSURE( sal_False, "### unexpected exception caught!" );
+        OSL_FAIL( "### unexpected exception caught!" );
         throw;
     }
 
diff --git a/stoc/test/testintrosp.cxx b/stoc/test/testintrosp.cxx
index 3a3aa0e..b9f11be 100644
--- a/stoc/test/testintrosp.cxx
+++ b/stoc/test/testintrosp.cxx
@@ -1241,7 +1241,7 @@ SAL_IMPLEMENT_MAIN()
     }
     catch (Exception & rExc)
     {
-        OSL_ENSURE( sal_False, "### exception occurred!" );
+        OSL_FAIL( "### exception occurred!" );
         OString aMsg( OUStringToOString( rExc.Message, RTL_TEXTENCODING_ASCII_US ) );
         OSL_TRACE( "### exception occurred: " );
         OSL_TRACE( "%s", aMsg.getStr() );
diff --git a/stoc/test/testsmgr_cpnt.cxx b/stoc/test/testsmgr_cpnt.cxx
index d8b800b..ac54363 100644
--- a/stoc/test/testsmgr_cpnt.cxx
+++ b/stoc/test/testsmgr_cpnt.cxx
@@ -319,7 +319,7 @@ sal_Bool SAL_CALL component_writeInfo(
         }
         catch (InvalidRegistryException &)
         {
-            OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
+            OSL_FAIL( "### InvalidRegistryException!" );
         }
     }
     return sal_False;


More information about the Libreoffice-commits mailing list