summaryrefslogtreecommitdiff
path: root/bridges/source/cpp_uno/gcc3_linux_s390x/except.cxx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-11-21 17:30:53 +0100
committerMichael Stahl <mstahl@redhat.com>2014-11-21 17:32:26 +0100
commit1276076ac8fcc84df64050f8aa194fa75386a0ea (patch)
tree258d77877c052464ff113f56355bbcc5d16e80a5 /bridges/source/cpp_uno/gcc3_linux_s390x/except.cxx
parent329742e6c9da7cd7848d92a6846e3d1249d8d9b4 (diff)
ibridges: convert all legacy osl/diagnose.h assertions in source/cppu_uno
Change-Id: I4e78fac76b6bb4923e3b680d910afe5bb9640c33
Diffstat (limited to 'bridges/source/cpp_uno/gcc3_linux_s390x/except.cxx')
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_s390x/except.cxx14
1 files changed, 5 insertions, 9 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_s390x/except.cxx b/bridges/source/cpp_uno/gcc3_linux_s390x/except.cxx
index b745a703b92f..92faed480720 100644
--- a/bridges/source/cpp_uno/gcc3_linux_s390x/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_s390x/except.cxx
@@ -26,7 +26,6 @@
#include <rtl/strbuf.hxx>
#include <rtl/ustrbuf.hxx>
-#include <osl/diagnose.h>
#include <osl/mutex.hxx>
#include <com/sun/star/uno/genfunc.hxx>
@@ -58,7 +57,7 @@ static OUString toUNOname( char const * p )
// example: N3com3sun4star4lang24IllegalArgumentExceptionE
OUStringBuffer buf( 64 );
- OSL_ASSERT( 'N' == *p );
+ assert( 'N' == *p );
++p; // skip N
while ('E' != *p)
@@ -145,7 +144,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr )
{
pair< t_rtti_map::iterator, bool > insertion(
m_rttis.insert( t_rtti_map::value_type( unoName, rtti ) ) );
- OSL_ENSURE( insertion.second, "### inserting new rtti failed?!" );
+ assert( insertion.second && "### inserting new rtti failed?!");
}
else
{
@@ -176,7 +175,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr )
pair< t_rtti_map::iterator, bool > insertion(
m_generatedRttis.insert( t_rtti_map::value_type( unoName, rtti ) ) );
- OSL_ENSURE( insertion.second, "### inserting new generated rtti failed?!" );
+ assert(insertion.second && "### inserting new generated rtti failed?!");
}
else // taking already generated rtti
{
@@ -199,7 +198,7 @@ static void deleteException( void * pExc )
typelib_TypeDescription * pTD = 0;
OUString unoName( toUNOname( header->exceptionType->name() ) );
::typelib_typedescription_getByName( &pTD, unoName.pData );
- OSL_ENSURE( pTD, "### unknown exception type! leaving out destruction => leaking!!!" );
+ assert(pTD && "### unknown exception type! leaving out destruction => leaking!!!");
if (pTD)
{
::uno_destructData( pExc, pTD, cpp_release );
@@ -216,7 +215,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
// construct cpp exception object
typelib_TypeDescription * pTypeDescr = 0;
TYPELIB_DANGER_GET( &pTypeDescr, pUnoExc->pType );
- OSL_ASSERT( pTypeDescr );
+ assert(pTypeDescr);
if (! pTypeDescr)
terminate();
@@ -242,7 +241,6 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
}
rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
TYPELIB_DANGER_RELEASE( pTypeDescr );
- OSL_ENSURE( rtti, "### no rtti for throwing exception!" );
if (! rtti)
terminate();
}
@@ -252,14 +250,12 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
void fillUnoException( __cxa_exception * header, uno_Any * pExc, uno_Mapping * pCpp2Uno )
{
- OSL_ENSURE( header, "### no exception header!!!" );
if (! header)
terminate();
typelib_TypeDescription * pExcTypeDescr = 0;
OUString unoName( toUNOname( header->exceptionType->name() ) );
::typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
- OSL_ENSURE( pExcTypeDescr, "### can not get type description for exception!!!" );
if (! pExcTypeDescr)
terminate();