fix printing
This commit is contained in:
parent
c58a8339e8
commit
8fd05525da
1 changed files with 10 additions and 5 deletions
|
|
@ -289,13 +289,18 @@ namespace fc
|
||||||
* @brief Checks a condition and throws an assert_exception if the test is FALSE
|
* @brief Checks a condition and throws an assert_exception if the test is FALSE
|
||||||
*/
|
*/
|
||||||
#define FC_ASSERT( TEST, ... ) \
|
#define FC_ASSERT( TEST, ... ) \
|
||||||
FC_EXPAND_MACRO( \
|
FC_EXPAND_MACRO( \
|
||||||
do { if( !(TEST) ) { FC_THROW_EXCEPTION( fc::assert_exception, #TEST ": " __VA_ARGS__ ); } } while(0); \
|
do { if( !(TEST) ) { FC_THROW_EXCEPTION( fc::assert_exception, #TEST ": " __VA_ARGS__ ); } } while(0); \
|
||||||
)
|
)
|
||||||
|
|
||||||
#define FC_THROW( FORMAT, ... ) \
|
#define FC_CAPTURE_AND_THROW( EXCEPTION_TYPE, ... ) \
|
||||||
|
do { throw EXCEPTION_TYPE( FC_LOG_MESSAGE( error, "", FC_FORMAT_ARG_PARAMS(__VA_ARGS__) ) ); } while(false);
|
||||||
|
|
||||||
|
//#define FC_THROW( FORMAT, ... )
|
||||||
|
|
||||||
|
#define FC_THROW( ... ) \
|
||||||
do { \
|
do { \
|
||||||
throw fc::exception( FC_LOG_MESSAGE( error, FORMAT, __VA_ARGS__ ) ); \
|
throw fc::exception( FC_LOG_MESSAGE( error, __VA_ARGS__ ) ); \
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
#define FC_EXCEPTION( EXCEPTION_TYPE, FORMAT, ... ) \
|
#define FC_EXCEPTION( EXCEPTION_TYPE, FORMAT, ... ) \
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue