summaryrefslogtreecommitdiff
path: root/bridges/source/cpp_uno/gcc3_linux_hppa/except.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'bridges/source/cpp_uno/gcc3_linux_hppa/except.cxx')
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_hppa/except.cxx24
1 files changed, 9 insertions, 15 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_hppa/except.cxx b/bridges/source/cpp_uno/gcc3_linux_hppa/except.cxx
index ff00f255cbb4..f982371c8a0a 100644
--- a/bridges/source/cpp_uno/gcc3_linux_hppa/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_hppa/except.cxx
@@ -25,8 +25,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"
@@ -59,7 +59,7 @@ namespace CPPU_CURRENT_NAMESPACE
// example: N3com3sun4star4lang24IllegalArgumentExceptionE
OUStringBuffer buf( 64 );
- OSL_ASSERT( 'N' == *p );
+ assert( 'N' == *p );
++p; // skip N
while ('E' != *p)
@@ -146,7 +146,7 @@ namespace CPPU_CURRENT_NAMESPACE
{
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
{
@@ -177,7 +177,7 @@ namespace CPPU_CURRENT_NAMESPACE
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
{
@@ -200,7 +200,7 @@ namespace CPPU_CURRENT_NAMESPACE
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 );
@@ -224,7 +224,7 @@ namespace CPPU_CURRENT_NAMESPACE
// construct cpp exception object
typelib_TypeDescription * pTypeDescr = 0;
TYPELIB_DANGER_GET( &pTypeDescr, pUnoExc->pType );
- OSL_ASSERT( pTypeDescr );
+ assert(pTypeDescr);
if (! pTypeDescr)
{
throw RuntimeException(
@@ -254,7 +254,7 @@ namespace CPPU_CURRENT_NAMESPACE
}
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 @@ namespace CPPU_CURRENT_NAMESPACE
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;
}
@@ -299,10 +296,7 @@ namespace CPPU_CURRENT_NAMESPACE
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
{