File tree Expand file tree Collapse file tree 2 files changed +2
-14
lines changed
Expand file tree Collapse file tree 2 files changed +2
-14
lines changed Original file line number Diff line number Diff line change @@ -65,15 +65,6 @@ namespace details {
6565 class comet_manager ;
6666}
6767
68- class webserver_exception : public std ::runtime_error
69- {
70- public:
71- webserver_exception ()
72- : std::runtime_error(" httpserver runtime error" )
73- {
74- }
75- };
76-
7768/* *
7869 * Class representing the webserver. Main class of the apis.
7970**/
Original file line number Diff line number Diff line change @@ -296,8 +296,7 @@ bool webserver::start(bool blocking)
296296 iov.push_back (gen (MHD_OPTION_LISTEN_SOCKET, bind_socket));
297297 if (start_method == http_utils::THREAD_PER_CONNECTION && max_threads != 0 )
298298 {
299- cout << " Cannot specify maximum number of threads when using a thread per connection" << endl;
300- throw ::httpserver::webserver_exception ();
299+ throw std::invalid_argument (" Cannot specify maximum number of threads when using a thread per connection" );
301300 }
302301
303302 if (max_threads != 0 )
@@ -381,9 +380,7 @@ bool webserver::start(bool blocking)
381380
382381 if (NULL == daemon)
383382 {
384- cout << gettext (" Unable to connect daemon to port: " ) <<
385- this ->port << endl;
386- throw ::httpserver::webserver_exception ();
383+ throw std::invalid_argument (" Unable to connect daemon to port: " + this ->port );
387384 }
388385 details::daemon_item* di = new details::daemon_item (this , daemon);
389386 daemons.push_back (di);
You can’t perform that action at this time.
0 commit comments