Updates from BitShares FC #22

Closed
nathanielhourt wants to merge 693 commits from dapp-support into latest-fc
Showing only changes of commit 164f1f68e6 - Show all commits

View file

@ -192,26 +192,27 @@ namespace fc
ss << "<- exception in to_detail_string."; ss << "<- exception in to_detail_string.";
} }
ss << " " << my->_name << ": " << my->_what << "\n"; ss << " " << my->_name << ": " << my->_what << "\n";
for( auto itr = my->_elog.begin(); itr != my->_elog.end(); ) { for( auto itr = my->_elog.begin(); itr != my->_elog.end(); )
{
try { try {
ss << itr->get_message() <<"\n"; ss << itr->get_message() <<"\n";
try try
{ {
ss << " " << json::to_string( itr->get_data() )<<"\n"; ss << " " << json::to_string( itr->get_data() )<<"\n";
} }
catch( const fc::assert_exception& e ) catch( const fc::assert_exception& e )
{ {
ss << "ERROR: Failed to convert log data to string!\n"; ss << "ERROR: Failed to convert log data to string!\n";
} }
ss << " " << itr->get_context().to_string(); ss << " " << itr->get_context().to_string();
++itr; ++itr;
} catch( std::bad_alloc& ) { } catch( std::bad_alloc& ) {
throw; throw;
} catch( ... ) { } catch( ... ) {
ss << "<- exception in to_detail_string."; ss << "<- exception in to_detail_string.";
} }
if( itr != my->_elog.end() ) ss<<"\n"; if( itr != my->_elog.end() ) ss<<"\n";
} }
} catch( std::bad_alloc& ) { } catch( std::bad_alloc& ) {
throw; throw;
} catch( ... ) { } catch( ... ) {
@ -230,14 +231,14 @@ namespace fc
ss << what() << ":"; ss << what() << ":";
for( auto itr = my->_elog.begin(); itr != my->_elog.end(); ++itr ) { for( auto itr = my->_elog.begin(); itr != my->_elog.end(); ++itr ) {
if( itr->get_format().size() ) if( itr->get_format().size() )
try { try {
ss << " " << fc::format_string( itr->get_format(), itr->get_data() ); ss << " " << fc::format_string( itr->get_format(), itr->get_data() );
} catch( std::bad_alloc& ) { } catch( std::bad_alloc& ) {
throw; throw;
} catch( ... ) { } catch( ... ) {
ss << "<- exception in to_string.\n"; ss << "<- exception in to_string.\n";
} }
} }
return ss.str(); return ss.str();
} catch( std::bad_alloc& ) { } catch( std::bad_alloc& ) {
throw; throw;