cmcfarlen commented on code in PR #12573:
URL: https://github.com/apache/trafficserver/pull/12573#discussion_r2441084583
##########
plugins/header_rewrite/matcher.h:
##########
@@ -149,7 +150,6 @@ template <class T> class Matchers : public Matcher
auto &re = std::get<regexHelper>(_data);
if (!re.setRegexMatch(s, has_modifier(mods,
CondModifiers::MOD_NOCASE))) {
- TSError("[%s] Invalid regex: failed to precompile: %s", PLUGIN_NAME,
s.c_str());
Dbg(pi_dbg_ctl, "Invalid regex: failed to precompile: %s",
s.c_str());
throw std::runtime_error("Malformed regex");
}
Review Comment:
I moved the error into the helper class so it could also print the regex
error. Currently you only get the regex that failed, now you'll get why and
what character too.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]