From ba45a9b09034b4ad477b3aa904ad47c4d8d5a205 Mon Sep 17 00:00:00 2001 From: Daniel Larimer Date: Thu, 22 May 2014 14:56:52 -0400 Subject: [PATCH] improve error reporting on std::exceptions --- include/fc/exception/exception.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/fc/exception/exception.hpp b/include/fc/exception/exception.hpp index 5b02e24..9a54db8 100644 --- a/include/fc/exception/exception.hpp +++ b/include/fc/exception/exception.hpp @@ -239,10 +239,10 @@ do { if( !(TEST) ) { FC_THROW_EXCEPTION( assert_exception, #TEST ": " __VA_ARGS catch( fc::exception& er ) { \ FC_RETHROW_EXCEPTION( er, LOG_LEVEL, FORMAT, __VA_ARGS__ ); \ } catch( const std::exception& e ) { \ - throw fc::std_exception( \ - FC_LOG_MESSAGE( LOG_LEVEL, FORMAT,__VA_ARGS__), \ + fc::std_exception fce( \ + FC_LOG_MESSAGE( LOG_LEVEL, "what: ${what} - " FORMAT,__VA_ARGS__("what",e.what())), \ std::current_exception(), \ - e.what() ) ; \ + e.what() ) ; throw fce;\ } catch( ... ) { \ throw fc::unhandled_exception( \ FC_LOG_MESSAGE( LOG_LEVEL, FORMAT,__VA_ARGS__), \