FC Updates from BitShares and myself #21

Closed
nathanielhourt wants to merge 687 commits from dapp-support into latest-fc
5 changed files with 8 additions and 10 deletions
Showing only changes of commit 84c16aeebb - Show all commits

View file

@ -45,7 +45,7 @@ class ripemd160
ripemd160 result();
private:
struct impl;
class impl;
fc::fwd<impl,96> my;
};

View file

@ -446,11 +446,11 @@ namespace fc
catch( fc::exception& er ) { \
FC_RETHROW_EXCEPTION( er, LOG_LEVEL, FORMAT, __VA_ARGS__ ); \
} catch( const std::exception& e ) { \
fc::exception fce( \
throw fc::exception( \
FC_LOG_MESSAGE( LOG_LEVEL, "${what}: " FORMAT,__VA_ARGS__("what",e.what())), \
fc::std_exception_code,\
typeid(e).name(), \
e.what() ) ; throw fce;\
e.what() ) ;\
} catch( ... ) { \
throw fc::unhandled_exception( \
FC_LOG_MESSAGE( LOG_LEVEL, FORMAT,__VA_ARGS__), \
@ -461,11 +461,11 @@ namespace fc
catch( fc::exception& er ) { \
FC_RETHROW_EXCEPTION( er, warn, "", FC_FORMAT_ARG_PARAMS(__VA_ARGS__) ); \
} catch( const std::exception& e ) { \
fc::exception fce( \
throw fc::exception( \
FC_LOG_MESSAGE( warn, "${what}: ",FC_FORMAT_ARG_PARAMS(__VA_ARGS__)("what",e.what())), \
fc::std_exception_code,\
typeid(e).name(), \
e.what() ) ; throw fce;\
e.what() ) ;\
} catch( ... ) { \
throw fc::unhandled_exception( \
FC_LOG_MESSAGE( warn, "",FC_FORMAT_ARG_PARAMS(__VA_ARGS__)), \

View file

@ -147,7 +147,7 @@ FC_REFLECT_TYPENAME( fc::log_message );
* @param LOG_LEVEL - a valid log_level::Enum name.
*/
#define FC_LOG_CONTEXT(LOG_LEVEL) \
fc::log_context( fc::log_level::LOG_LEVEL, __FILE__, __LINE__, __func__ )
fc::log_context( fc::log_level::LOG_LEVEL, (const char*)__FILE__, __LINE__, (const char*)__func__ )
/**
* @def FC_LOG_MESSAGE(LOG_LEVEL,FORMAT,...)

View file

@ -46,8 +46,6 @@ BOOST_AUTO_TEST_CASE(bigint_test_2)
BOOST_CHECK( bi_accu >= a_1 );
} while ( bi_accu.log2() <= 128 );
bi_accu = bi_accu;
BOOST_CHECK( bi_accu && !bi_accu.is_negative() && bi_accu != bi_1 );
BOOST_CHECK( bi_3.exp( bi_accu.log2() ) > bi_accu );

View file

@ -171,7 +171,7 @@ static bool equal( const fc::variant& a, const fc::variant& b )
return true;
case fc::variant::type_id::blob_type:
default:
FC_THROW_EXCEPTION( fc::invalid_arg_exception, "Unsupported variant type: " + a.get_type() );
FC_THROW_EXCEPTION( fc::invalid_arg_exception, "Unsupported variant type: " + std::to_string( a.get_type() ) );
}
}
@ -348,7 +348,7 @@ BOOST_AUTO_TEST_CASE(rethrow_test)
} FC_RETHROW_EXCEPTIONS( warn, "Argh! ${biggie}", ("biggie",biggie) ) };
BOOST_CHECK_THROW( test_r(), fc::unknown_host_exception );
auto test_lr = [&biggie](){
auto test_lr = [](){
try {
FC_THROW_EXCEPTION( fc::unknown_host_exception, "WTF?" );
} FC_LOG_AND_RETHROW() };