From c68500efaee16d590205ad23b48445c62e72667b Mon Sep 17 00:00:00 2001 From: casey langen Date: Tue, 28 Feb 2017 23:02:41 -0800 Subject: [PATCH] Slightly improved error logging in the web socket plugin. --- src/contrib/websocket_remote/main.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/contrib/websocket_remote/main.cpp b/src/contrib/websocket_remote/main.cpp index 6623201ff..ef8332648 100644 --- a/src/contrib/websocket_remote/main.cpp +++ b/src/contrib/websocket_remote/main.cpp @@ -931,8 +931,11 @@ class PlaybackRemote : public IPlaybackRemote { catch (websocketpp::exception const & e) { std::cerr << e.what() << std::endl; } + catch (std::exception& e) { + std::cerr << "ThreadProc failed: " << e.what() << std::endl; + } catch (...) { - std::cerr << "other exception" << std::endl; + std::cerr << "unknown exception" << std::endl; } } @@ -956,6 +959,10 @@ class PlaybackRemote : public IPlaybackRemote { this->HandleRequest(hdl, data); } } + catch (std::exception& e) { + std::cerr << "OnMessage failed: " << e.what() << std::endl; + this->RespondWithInvalidRequest(hdl, value::invalid, value::invalid); + } catch (...) { std::cerr << "message parse failed: " << msg->get_payload() << "\n"; this->RespondWithInvalidRequest(hdl, value::invalid, value::invalid);