summaryrefslogtreecommitdiff
path: root/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'bridges/source/cpp_uno/gcc3_linux_intel/except.cxx')
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_intel/except.cxx20
1 files changed, 7 insertions, 13 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx b/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx
index d1d507168f67..47e570d41719 100644
--- a/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx
@@ -24,8 +24,8 @@
#include <rtl/strbuf.hxx>
#include <rtl/ustrbuf.hxx>
-#include <osl/diagnose.h>
#include <osl/mutex.hxx>
+#include <sal/log.hxx>
#include <com/sun/star/uno/genfunc.hxx>
#include "com/sun/star/uno/RuntimeException.hpp"
@@ -55,7 +55,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)
@@ -205,7 +205,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 );
@@ -230,7 +230,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(
@@ -260,7 +260,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(
@@ -279,10 +279,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;
}
@@ -298,10 +295,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
{