1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:38:11 +00:00

LibRegex: Don't print error message in Regex constructor

It should be up to the caller to decide what to do when parsing of the
pattern fails.
This commit is contained in:
Linus Groh 2020-11-28 15:01:01 +00:00 committed by Andreas Kling
parent 952c0dc2a0
commit ca8e5b0791

View file

@ -45,11 +45,8 @@ Regex<Parser>::Regex(StringView pattern, typename ParserTraits<Parser>::OptionsT
Parser parser(lexer, regex_options);
parser_result = parser.parse();
if (parser_result.error == regex::Error::NoError) {
if (parser_result.error == regex::Error::NoError)
matcher = make<Matcher<Parser>>(*this, regex_options);
} else {
fprintf(stderr, "%s\n", error_string().characters());
}
}
template<class Parser>