Skip to content

Commit 2cb3a77

Browse files
Display method and URL before terminating due to unhandled route
1 parent 65f0af8 commit 2cb3a77

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/HttpContext.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Authored by Alex Hultman, 2018-2020.
2+
* Authored by Alex Hultman, 2018-2026.
33
* Intellectual property of third-party.
44
55
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -201,7 +201,10 @@ struct HttpContext {
201201
/* Returning from a request handler without responding or attaching an onAborted handler is ill-use */
202202
if (!((HttpResponse<SSL> *) s)->hasResponded() && !httpResponseData->onAborted) {
203203
/* Throw exception here? */
204-
std::cerr << "Error: Returning from a request handler without responding or attaching an abort handler is forbidden!" << std::endl;
204+
std::cerr << "Error: Returning from a request handler without responding or attaching an abort handler is forbidden!"
205+
<< std::endl
206+
<< "\tMethod: \"" << httpRequest->getCaseSensitiveMethod() << "\"" << std::endl
207+
<< "\tURL: \"" << httpRequest->getUrl() << "\"" << std::endl;
205208
std::terminate();
206209
}
207210

0 commit comments

Comments
 (0)