summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2021-05-17 14:26:34 +0300
committerEvgeny Zinoviev <me@ch1p.io>2021-05-17 14:26:34 +0300
commitd50de2735d4af1056f0301ba99c40aac082bad27 (patch)
tree2dbc09d69809c7d22c75908f5c95a9d88a5911c9 /src
parent9646193f7ec6b96cfbd0fe1721965dc9d0f4b4ed (diff)
server: write errors to stderr
Diffstat (limited to 'src')
-rw-r--r--src/server/connection.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/server/connection.cc b/src/server/connection.cc
index c662d6d..1d87517 100644
--- a/src/server/connection.cc
+++ b/src/server/connection.cc
@@ -233,6 +233,8 @@ Response Connection::processRequest(char* buf) {
}
// we except std::invalid_argument and std::runtime_error
catch (std::exception& e) {
+ myerr << e.what();
+
resp.type = ResponseType::Error;
auto err = p18::response_type::ErrorResponse(e.what());