1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 15:47:35 +00:00

LibIMAP: Propagate errors from Parser::parse_number()

More error propagation is still needed, we really want the parser to
just crash early when it encounters unexpected input, instead of trying
to carry on like nothing happened.
I think ErrorOr<unsigned> is *much* better than returning (unsigned)-1
to indicate an error ;)
This commit is contained in:
Valtteri Koskivuori 2023-07-31 23:21:52 +03:00 committed by Andrew Kaster
parent 077a8058c3
commit 35f1cec7ca
2 changed files with 18 additions and 18 deletions

View file

@ -32,7 +32,7 @@ private:
bool at_end() { return m_position >= m_buffer.size(); }
unsigned parse_number();
ErrorOr<unsigned> parse_number();
Optional<unsigned> try_parse_number();
void parse_response_done();