Make objectFromStream always throw parse_error_exception when throwing
This commit is contained in:
parent
cde67a202c
commit
e8326ca66c
1 changed files with 31 additions and 30 deletions
|
|
@ -43,7 +43,6 @@ namespace fc
|
|||
FC_THROW_EXCEPTION( parse_error_exception, "Expected '\\'" );
|
||||
}
|
||||
|
||||
|
||||
template<typename T>
|
||||
void skip_white_space( T& in )
|
||||
{
|
||||
|
|
@ -176,8 +175,10 @@ namespace fc
|
|||
return obj;
|
||||
}
|
||||
FC_THROW_EXCEPTION( parse_error_exception, "Expected '}' after ${variant}", ("variant", obj ) );
|
||||
|
||||
|
||||
}
|
||||
catch( const fc::eof_exception& e )
|
||||
{
|
||||
FC_THROW_EXCEPTION( parse_error_exception, "Unexpected EOF: ${e}", ("e", e.to_detail_string() ) );
|
||||
} FC_RETHROW_EXCEPTIONS( warn, "Error parsing object" );
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue