summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/regex_filter.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/regex_filter.h b/src/regex_filter.h
index a0bbabcf..8b3f3c0a 100644
--- a/src/regex_filter.h
+++ b/src/regex_filter.h
@@ -30,6 +30,7 @@
#endif // BOOST_REGEX_ICU
#include <cassert>
+#include <iostream>
namespace Regex {
@@ -64,8 +65,9 @@ inline bool search(StringT &&s, const Regex &rx)
boost::regex_search
# endif // BOOST_REGEX_ICU
(std::forward<StringT>(s), rx);
- } catch (std::out_of_range &) {
+ } catch (std::out_of_range &e) {
// Invalid UTF-8 sequence, ignore the string.
+ std::cerr << "Regex::search: error while processing \"" << s << "\": " << e.what() << "\n";
return false;
}
}