错误处理
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
#include "Web_Event_Adapter.h"
|
||||
#include "Web_Plot_Session.h"
|
||||
#include <renderive/error/Error_Policy.hpp>
|
||||
|
||||
#include <trantor/utils/Logger.h>
|
||||
|
||||
@@ -57,8 +58,10 @@ void Renderive_WebSocket_Controller::handleNewMessage(
|
||||
connection->send(response->payload.data(), response->payload.size(),
|
||||
message_type);
|
||||
}
|
||||
} catch (const std::exception& error) {
|
||||
LOG_ERROR << "Renderive WebSocket session failed: " << error.what();
|
||||
} catch (...) {
|
||||
static_cast<void>(::renderive::error::capture(
|
||||
"handling Renderive WebSocket request", std::current_exception()));
|
||||
LOG_ERROR << "Renderive WebSocket session failed";
|
||||
connection->shutdown(drogon::CloseCode::kUnexpectedCondition,
|
||||
"Renderive rendering failed");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user