Merge branch 'phoenix' of https://github.com/InvictusInnovations/fc into phoenix
This commit is contained in:
commit
6e7da6ca78
2 changed files with 8 additions and 4 deletions
|
|
@ -297,10 +297,12 @@ namespace fc
|
|||
do { throw EXCEPTION_TYPE( FC_LOG_MESSAGE( error, "", FC_FORMAT_ARG_PARAMS(__VA_ARGS__) ) ); } while(false);
|
||||
|
||||
//#define FC_THROW( FORMAT, ... )
|
||||
|
||||
// FC_INDIRECT_EXPAND workas around a bug in Visual C++ variadic macro processing that prevents it
|
||||
// from separating __VA_ARGS__ into separate tokens
|
||||
#define FC_INDIRECT_EXPAND(MACRO, ARGS) MACRO ARGS
|
||||
#define FC_THROW( ... ) \
|
||||
do { \
|
||||
throw fc::exception( FC_LOG_MESSAGE( error, __VA_ARGS__ ) ); \
|
||||
throw fc::exception( FC_INDIRECT_EXPAND(FC_LOG_MESSAGE, ( error, __VA_ARGS__ )) ); \
|
||||
} while(0)
|
||||
|
||||
#define FC_EXCEPTION( EXCEPTION_TYPE, FORMAT, ... ) \
|
||||
|
|
|
|||
|
|
@ -131,8 +131,10 @@ namespace fc
|
|||
#define FC_FORMAT( SEQ )\
|
||||
BOOST_PP_SEQ_FOR_EACH( FC_FORMAT_ARG, v, SEQ )
|
||||
|
||||
#define FC_FORMAT_ARG_PARAMS( SEQ )\
|
||||
BOOST_PP_SEQ_FOR_EACH( FC_FORMAT_ARGS, v, SEQ )
|
||||
// takes a ... instead of a SEQ arg because it can be called with an empty SEQ
|
||||
// from FC_CAPTURE_AND_THROW()
|
||||
#define FC_FORMAT_ARG_PARAMS( ... )\
|
||||
BOOST_PP_SEQ_FOR_EACH( FC_FORMAT_ARGS, v, __VA_ARGS__ )
|
||||
|
||||
#define idump( SEQ ) \
|
||||
ilog( FC_FORMAT(SEQ), FC_FORMAT_ARG_PARAMS(SEQ) )
|
||||
|
|
|
|||
Loading…
Reference in a new issue