25 void MessagePrinterErrorCollect ::
26 print (MSG::Level reglvl,
const std::string& ,
27 const std::string& text)
29 if (reglvl >= MSG::ERROR)
31 m_errorMessages.push_back (text);
37 bool MessagePrinterErrorCollect ::
38 empty () const noexcept
40 return m_errorMessages.empty();
45 bool MessagePrinterErrorCollect ::
46 matchesRegex (
const std::string& pattern)
const
48 std::regex
regex (pattern);
49 for (
auto&
msg : m_errorMessages)
51 if (std::regex_search (
msg, regex))
59 std::string MessagePrinterErrorCollect ::
60 asString (
const std::string& prefix)
const
63 for (
auto&
msg : m_errorMessages)