From df2d013bad07c3267c8ece4424dfeb6a6a50c5df Mon Sep 17 00:00:00 2001 From: Daniel Larimer Date: Wed, 4 Jun 2014 22:17:21 +0000 Subject: [PATCH] fix exceptions when parsing json --- src/io/json.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/io/json.cpp b/src/io/json.cpp index e96cb25..7a0703b 100644 --- a/src/io/json.cpp +++ b/src/io/json.cpp @@ -391,11 +391,11 @@ namespace fc return variant(); } variant json::from_string( const std::string& utf8_str ) - { - std::stringstream in( utf8_str ); - in.exceptions( std::ifstream::eofbit ); + { try { + fc::stringstream in( utf8_str ); + //in.exceptions( std::ifstream::eofbit ); return variant_from_stream( in ); - } + } FC_RETHROW_EXCEPTIONS( warn, "", ("str",utf8_str) ) } /* void toUTF8( const char str, ostream& os )