mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-07 00:29:15 +00:00
LibGemini: Replace fprintf(stderr) with warnln()
This commit is contained in:
parent
303358220b
commit
b5aaae7b40
Notes:
sideshowbarker
2024-07-18 17:06:56 +09:00
Author: https://github.com/linusg
Commit: b5aaae7b40
Pull-request: https://github.com/SerenityOS/serenity/pull/7630
1 changed files with 3 additions and 3 deletions
|
@ -65,7 +65,7 @@ void Job::on_socket_connected()
|
||||||
|
|
||||||
auto line = read_line(PAGE_SIZE);
|
auto line = read_line(PAGE_SIZE);
|
||||||
if (line.is_null()) {
|
if (line.is_null()) {
|
||||||
fprintf(stderr, "Job: Expected status line\n");
|
warnln("Job: Expected status line");
|
||||||
return deferred_invoke([this](auto&) { did_fail(Core::NetworkJob::Error::TransmissionFailed); });
|
return deferred_invoke([this](auto&) { did_fail(Core::NetworkJob::Error::TransmissionFailed); });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ void Job::on_socket_connected()
|
||||||
|
|
||||||
auto status = parts[0].to_uint();
|
auto status = parts[0].to_uint();
|
||||||
if (!status.has_value()) {
|
if (!status.has_value()) {
|
||||||
fprintf(stderr, "Job: Expected numeric status code\n");
|
warnln("Job: Expected numeric status code");
|
||||||
return deferred_invoke([this](auto&) { did_fail(Core::NetworkJob::Error::ProtocolFailed); });
|
return deferred_invoke([this](auto&) { did_fail(Core::NetworkJob::Error::ProtocolFailed); });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ void Job::on_socket_connected()
|
||||||
} else if (m_status >= 60 && m_status < 70) {
|
} else if (m_status >= 60 && m_status < 70) {
|
||||||
m_state = State::InBody;
|
m_state = State::InBody;
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, "Job: Expected status between 10 and 69; instead got %d\n", m_status);
|
warnln("Job: Expected status between 10 and 69; instead got {}", m_status);
|
||||||
return deferred_invoke([this](auto&) { did_fail(Core::NetworkJob::Error::ProtocolFailed); });
|
return deferred_invoke([this](auto&) { did_fail(Core::NetworkJob::Error::ProtocolFailed); });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue