diff options
Diffstat (limited to 'bridges/source/cpp_uno/mingw_x86-64/except.cxx')
-rw-r--r-- | bridges/source/cpp_uno/mingw_x86-64/except.cxx | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/bridges/source/cpp_uno/mingw_x86-64/except.cxx b/bridges/source/cpp_uno/mingw_x86-64/except.cxx index 3a9f6e1b426e..af50e5ca59f2 100644 --- a/bridges/source/cpp_uno/mingw_x86-64/except.cxx +++ b/bridges/source/cpp_uno/mingw_x86-64/except.cxx @@ -30,7 +30,7 @@ #include <rtl/strbuf.hxx> #include <rtl/ustrbuf.hxx> -#include <osl/diagnose.h> +#include <sal/log.hxx> #include <osl/mutex.hxx> #include <com/sun/star/uno/genfunc.hxx> @@ -63,7 +63,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) @@ -167,7 +167,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 { @@ -190,7 +190,7 @@ static void _GLIBCXX_CDTOR_CALLABI 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 ); @@ -215,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) { throw RuntimeException( @@ -245,7 +245,7 @@ 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!" ); + assert(rtti && "### no rtti for throwing exception!"); if (! rtti) { throw RuntimeException( @@ -264,10 +264,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping RuntimeException aRE( "no exception header!" ); Type const & rType = ::getCppuType( &aRE ); uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno ); -#if OSL_DEBUG_LEVEL > 0 - OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) ); - OSL_FAIL( cstr.getStr() ); -#endif + SAL_WARN("bridges", aRE.Message); return; } @@ -283,10 +280,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping RuntimeException aRE( OUString("exception type not found: ") + unoName ); Type const & rType = ::getCppuType( &aRE ); uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno ); -#if OSL_DEBUG_LEVEL > 0 - OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) ); - OSL_FAIL( cstr.getStr() ); -#endif + SAL_WARN("bridges", aRE.Message); } else { |