From 09b2a96425cea5fb2967b2fde2519c669bc4e53f Mon Sep 17 00:00:00 2001 From: gscalamera <graziano.scalamera@elettra.eu> Date: Thu, 21 Jan 2021 10:42:26 +0100 Subject: [PATCH] Remove tabs and newlines from exception messages --- src/event_table.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/event_table.cpp b/src/event_table.cpp index c7821de..6b57407 100644 --- a/src/event_table.cpp +++ b/src/event_table.cpp @@ -20,6 +20,7 @@ //for get_event_system_for_event_id, to know if ZMQ #include <eventconsumer.h> +#include <regex> static const char __FILE__rev[] = __FILE__ " $Revision: 1.5 $"; @@ -1222,6 +1223,7 @@ void EventCallBack::push_event(Tango::EventData* ev) //e.ev_name = INTERNAL_ERROR; //e.type = -1; e.msg = o.str(); + e.msg = std::regex_replace(e.msg, std::regex(R"((\n)|(\t))"), " "); //match raw string "\n" or "\t" and replace with " " } } catch (string &err) { -- GitLab