From 9c449ecfff94782e117741bc249ee15ff3857367 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Sat, 14 Dec 2024 00:20:22 +0500 Subject: upd: it's dangerous to send exception reasons to chats --- bot/src/handlers.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'bot/src/handlers.cpp') diff --git a/bot/src/handlers.cpp b/bot/src/handlers.cpp index 00c815f..fe8c73c 100644 --- a/bot/src/handlers.cpp +++ b/bot/src/handlers.cpp @@ -57,11 +57,12 @@ namespace bot::handlers { } catch (const std::exception &e) { std::string line = bundle.localization - .get_formatted_line(request.value(), loc::LineId::ErrorTemplate, - {e.what()}) + .get_formatted_line(request.value(), + loc::LineId::ErrorSomethingWentWrong, {}) .value(); bundle.irc_client.say(message.source.login, line); + log::error("PrivMsg/" + request->command_id, e.what()); } } -- cgit v1.2.3