fix exceptions when parsing json
This commit is contained in:
parent
942545df5e
commit
df2d013bad
1 changed files with 4 additions and 4 deletions
|
|
@ -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 )
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue