server: add --media-path for local media files (#17697)
* server: add --media-path for local media files * remove unused fn
This commit is contained in:
parent
a96283adc4
commit
13628d8bdb
9 changed files with 133 additions and 38 deletions
|
|
@ -38,9 +38,11 @@ static server_http_context::handler_t ex_wrapper(server_http_context::handler_t
|
|||
try {
|
||||
return func(req);
|
||||
} catch (const std::invalid_argument & e) {
|
||||
// treat invalid_argument as invalid request (400)
|
||||
error = ERROR_TYPE_INVALID_REQUEST;
|
||||
message = e.what();
|
||||
} catch (const std::exception & e) {
|
||||
// treat other exceptions as server error (500)
|
||||
error = ERROR_TYPE_SERVER;
|
||||
message = e.what();
|
||||
} catch (...) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue