Skip to content

Commit f225565

Browse files
committed
Added exception logging for 'httpserver::webserver::start' when initializing RESTAPI server
1 parent 14be3d4 commit f225565

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/ProxySQL_RESTAPI_Server.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,12 @@ class gen_get_endpoint : public http_resource {
663663

664664
void * restapi_server_thread(void *arg) {
665665
httpserver::webserver * ws = (httpserver::webserver *)arg;
666-
ws->start(true);
666+
try {
667+
ws->start(true);
668+
} catch (const std::exception& ex) {
669+
proxy_error("Exception starting 'RESTAPI Server': %s\n", ex.what());
670+
throw;
671+
}
667672
return NULL;
668673
}
669674

0 commit comments

Comments
 (0)