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

LibHTTP: Propagate and gracefully handle errors in Job

Most of these errors mean that we will fail the job, but it won't crash
the application, at least.
This commit is contained in:
sin-ack 2022-02-04 10:49:59 +00:00 committed by Andreas Kling
parent 3f614a8fca
commit 42a76b6c2d
2 changed files with 118 additions and 33 deletions

View file

@ -37,8 +37,8 @@ protected:
void on_socket_connected();
void flush_received_buffers();
void register_on_ready_to_read(Function<void()>);
String read_line(size_t);
ByteBuffer receive(size_t);
ErrorOr<String> read_line(size_t);
ErrorOr<ByteBuffer> receive(size_t);
void timer_event(Core::TimerEvent&) override;
enum class State {