INTEGRATION: CWS chart2mst3 (1.1.1.1.4); FILE MERGED
2005/10/07 11:47:23 bm 1.1.1.1.4.4: RESYNC: (1.1.1.1-1.2); FILE MERGED 2004/06/07 15:34:47 bm 1.1.1.1.4.3: show exception type in ASSERT_EXCEPTION 2004/04/27 13:32:42 iha 1.1.1.1.4.2: warnings removed 2004/03/04 08:55:36 bm 1.1.1.1.4.1: ASSERT_EXCEPTION: for pro-builds print the exception variable to avoid warning
This commit is contained in:
parent
dfd2b11e90
commit
6206ae797f
1 changed files with 17 additions and 6 deletions
|
@ -4,9 +4,9 @@
|
|||
*
|
||||
* $RCSfile: macros.hxx,v $
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Revision: 1.3 $
|
||||
*
|
||||
* last change: $Author: rt $ $Date: 2005-09-08 00:47:36 $
|
||||
* last change: $Author: vg $ $Date: 2007-05-22 18:25:29 $
|
||||
*
|
||||
* The Contents of this file are made available subject to
|
||||
* the terms of GNU Lesser General Public License Version 2.1.
|
||||
|
@ -35,14 +35,25 @@
|
|||
#ifndef CHART_MACROS_HXX
|
||||
#define CHART_MACROS_HXX
|
||||
|
||||
#include <typeinfo>
|
||||
|
||||
/// creates a unicode-string from an ASCII string
|
||||
#define C2U(constAsciiStr) (::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( constAsciiStr ) ))
|
||||
|
||||
/// shows an error-box for an exception ex
|
||||
#define ASSERT_EXCEPTION(ex) \
|
||||
/** shows an error-box for an exception ex
|
||||
else-branch necessary to avoid warning
|
||||
*/
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
#define ASSERT_EXCEPTION(ex) \
|
||||
OSL_ENSURE( false, ::rtl::OUStringToOString( \
|
||||
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Exception caught: " )) + \
|
||||
ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr());
|
||||
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Exception caught. Type: " )) +\
|
||||
::rtl::OUString::createFromAscii( typeid( ex ).name()) +\
|
||||
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ", Message: " )) +\
|
||||
ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr())
|
||||
#else
|
||||
//avoid compilation warnings
|
||||
#define ASSERT_EXCEPTION(ex) ex.Context.is();
|
||||
#endif
|
||||
|
||||
#define U2C(ouString) (::rtl::OUStringToOString(ouString,RTL_TEXTENCODING_ASCII_US).getStr())
|
||||
|
||||
|
|
Loading…
Reference in a new issue