Slightly improved error logging in the web socket plugin.

This commit is contained in:
casey langen 2017-02-28 23:02:41 -08:00
parent e90719eac5
commit c68500efae

View File

@ -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);