fix exceptions when parsing json

This commit is contained in:
Daniel Larimer 2014-06-04 22:17:21 +00:00
parent 942545df5e
commit df2d013bad

View file

@ -391,11 +391,11 @@ namespace fc
return variant(); return variant();
} }
variant json::from_string( const std::string& utf8_str ) variant json::from_string( const std::string& utf8_str )
{ { try {
std::stringstream in( utf8_str ); fc::stringstream in( utf8_str );
in.exceptions( std::ifstream::eofbit ); //in.exceptions( std::ifstream::eofbit );
return variant_from_stream( in ); return variant_from_stream( in );
} } FC_RETHROW_EXCEPTIONS( warn, "", ("str",utf8_str) ) }
/* /*
void toUTF8( const char str, ostream& os ) void toUTF8( const char str, ostream& os )