diff --git a/main.cpp b/main.cpp index 23140cb..24114b6 100644 --- a/main.cpp +++ b/main.cpp @@ -62,8 +62,10 @@ int main(int argc, char** argv) { try { std::rethrow_exception(ep); } catch (const std::exception& e) { + fprintf(stderr, "Exception thrown on %s: %s\n", req.path.c_str(), e.what()); serve_error(req, res, config, "500: Internal server error", std::nullopt, e.what()); } catch (...) { + fprintf(stderr, "Exception thrown on %s: Unknown exception\n", req.path.c_str()); serve_error(req, res, config, "500: Internal server error", std::nullopt, "Unknown exception"); } });