summaryrefslogtreecommitdiff
path: root/stoc
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 /stoc
parent1fa55878d9a8e0ce48501ad82fb537dc9c29855a (diff)
Move OSL_ENSURE(sal_False,...) to OSL_FAIL(...)
Diffstat (limited to 'stoc')
-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
18 files changed, 37 insertions, 53 deletions
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;