This commit is contained in:
Siarhei Fedartsou 2024-05-22 20:32:46 +02:00
parent 3552443896
commit 75a5d6d586

View File

@ -56,8 +56,11 @@ boost::optional<ParsedURL> parseURL(std::string::iterator &iter, const std::stri
return boost::make_optional(out); return boost::make_optional(out);
} }
} }
catch (const x3::expectation_failure<std::string::iterator> &) catch (const x3::expectation_failure<std::string::iterator> &failure)
{ {
// The grammar above using expectation parsers ">" does not automatically increment the
// iterator to the failing position. Extract the position from the exception ourselves.
iter = failure.where();
} }
return boost::none; return boost::none;