Fix GUI Json creation error

This commit is contained in:
Alexander Bock
2018-11-30 20:09:00 -05:00
parent c7a96a6b59
commit 06b20d2fe8
2 changed files with 9 additions and 2 deletions
+6 -1
View File
@@ -90,9 +90,14 @@ void Connection::handleMessage(const std::string& message) {
nlohmann::json j = nlohmann::json::parse(message.c_str());
try {
handleJson(j);
} catch (const std::exception& e) {
} catch (const std::domain_error& e) {
LERROR(fmt::format("JSON handling error from: {}. {}", message, e.what()));
}
} catch (const std::out_of_range& e) {
LERROR(fmt::format("JSON handling error from: {}. {}", message, e.what()));
}
catch (const std::exception& e) {
LERROR(e.what());
} catch (...) {
if (!isAuthorized()) {
_socket->disconnect();