summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2011-03-19 14:12:37 +0100
committerThomas Arnhold <thomas@arnhold.org>2011-03-19 14:12:37 +0100
commit5a7f6793ac227c348198ae5958db5951214ec8d2 (patch)
tree25610ad164b4f66d705aecf6ea6c3ee72809c7e3
parent1fa55878d9a8e0ce48501ad82fb537dc9c29855a (diff)
Move OSL_ENSURE(sal_False,...) to OSL_FAIL(...)
-rw-r--r--cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx2
-rw-r--r--cppu/source/typelib/typelib.cxx2
-rw-r--r--cppu/source/uno/destr.hxx2
-rw-r--r--cppuhelper/source/implbase.cxx2
-rw-r--r--cppuhelper/source/implementationentry.cxx2
-rw-r--r--cppuhelper/source/propshlp.cxx4
-rw-r--r--cppuhelper/test/testimplhelper.cxx4
-rw-r--r--cppuhelper/test/testpropshlp.cxx42
-rw-r--r--io/test/stm/testfactreg.cxx2
-rw-r--r--remotebridges/examples/officeclient.cxx2
-rw-r--r--sal/osl/os2/file.cxx2
-rw-r--r--sal/test/unloading/samplelib1.cxx2
-rw-r--r--sal/test/unloading/samplelib2.cxx2
-rw-r--r--stoc/source/corereflection/crbase.cxx6
-rw-r--r--stoc/source/implementationregistration/implreg.cxx2
-rw-r--r--stoc/source/inspect/introspection.cxx5
-rw-r--r--stoc/source/registry_tdprovider/base.hxx4
-rw-r--r--stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx33
-rw-r--r--stoc/source/registry_tdprovider/tdmodule.cxx3
-rw-r--r--stoc/source/registry_tdprovider/tdprovider.cxx7
-rw-r--r--stoc/source/registry_tdprovider/tdservice.cxx2
-rw-r--r--stoc/source/servicemanager/servicemanager.cxx4
-rw-r--r--stoc/source/tdmanager/tdmgr_tdenumeration.cxx6
-rw-r--r--stoc/test/excomp/excomp1.cxx2
-rw-r--r--stoc/test/excomp/excomp2.cxx2
-rw-r--r--stoc/test/javavm/testjavavm.cxx2
-rw-r--r--stoc/test/testconv.cxx2
-rw-r--r--stoc/test/testcorefl.cxx2
-rw-r--r--stoc/test/testiadapter.cxx4
-rw-r--r--stoc/test/testintrosp.cxx2
-rw-r--r--stoc/test/testsmgr_cpnt.cxx2
31 files changed, 72 insertions, 88 deletions
diff --git a/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx b/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx
index d3f4339a885a..1240df313f57 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 0c62eecaafb8..747f012ace45 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 ce64f2d82e7f..92da095f1ac1 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 3f0e238762f6..162f11d81cc8 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 9277a1f7d7b4..8689f24f51ec 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 1305de692890..332439130c84 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 6a5e741c4975..db45093f3e8b 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 de5624bc90b1..965159ffc637 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 05aaa92b1c34..fc43bb7a9ccd 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 c6c7d3af7335..fb7f134f3466 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 4a67b10fea23..464e65a03d0e 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 5199e25a6078..a0557906f3dc 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 621dace1db20..348e2619646c 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 c88b2be1d0d9..3f17d9283082 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 7ae7b28918cb..6e4a1aaf8e54 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 98d9a4c55d0a..b6770e7d2cba 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 4bb05982c847..532b81dd8468 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 9feae0da9ef0..3aea56231ad9 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 f187c8853415..82464efb9442 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 eb2629558fcc..bcebd85ffd44 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 4a87927b6429..76c50932f22b 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 ce0d1b32adad..2d3fc08016d2 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 a73625cf058c..aa48a275cb8e 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 44d81cd55f06..e594fbef6688 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 9e484c11d268..88380740b89b 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 2cffe1541b66..fbbcb646a7c6 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 a7f8f9926ae3..445d7e9a9764 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 e43687c92f5b..d3a5a5d1b153 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 b91cae5ec98a..9a111ce0aac2 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 000d95279983..692a7c1113dd 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 741f23b15954..d4ac7527f1ee 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;