Catch boost bad_numeric_cast exception and let parser return an error
This commit is contained in:
committed by
Patrick Niklaus
parent
14b024e4dc
commit
240a7696da
@@ -55,6 +55,11 @@ boost::optional<ParameterT> parseParameters(std::string::iterator &iter,
|
||||
// iterator to the failing position. Extract the position from the exception ourselves.
|
||||
iter = failure.first;
|
||||
}
|
||||
catch (const boost::numeric::bad_numeric_cast &e)
|
||||
{
|
||||
// this can happen if we get bad numeric values in the request, just handle
|
||||
// as normal parser error
|
||||
}
|
||||
|
||||
return boost::none;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user