diff options
author | Ossama Othman <ossama.othman@intel.com> | 2013-12-16 12:49:42 -0800 |
---|---|---|
committer | Ossama Othman <ossama.othman@intel.com> | 2013-12-16 12:49:42 -0800 |
commit | c2893b506684cc51013d79325074deb5cb6934de (patch) | |
tree | c4fc36bcdbdff2d2dd07e9409ee64da1b9ff3527 /src | |
parent | 3b597925ae11ce329673f1a3322b81d2a2da6708 (diff) | |
download | settings-daemon-c2893b506684cc51013d79325074deb5cb6934de.tar.gz settings-daemon-c2893b506684cc51013d79325074deb5cb6934de.tar.bz2 settings-daemon-c2893b506684cc51013d79325074deb5cb6934de.zip |
Do not terminate settingsd on plugin exception.
Improve exception reporting, as well.
Change-Id: I6e4c839caca4a08c71e15335d2997403f39aa21b
Signed-off-by: Ossama Othman <ossama.othman@intel.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/websocket_server.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/websocket_server.cpp b/src/websocket_server.cpp index 636e893..5f158af 100644 --- a/src/websocket_server.cpp +++ b/src/websocket_server.cpp @@ -29,7 +29,7 @@ #include "../lib/config.hpp" #include "../lib/manager.hpp" -#include <stdexcept> +#include <system_error> @@ -136,7 +136,9 @@ ivi::settings::websocket_server::websocket_server( context_ = libwebsocket_create_context(&info); if (context_ == nullptr) - throw std::runtime_error("Unable to initialize websocket."); + throw std::system_error(errno, + std::system_category(), + "Unable to initialize websocket."); std::cout << "\n" PACKAGE_NAME " listening for requests on port " << info.port << ".\n"; |