mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 18:50:50 +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:
parent
952c0dc2a0
commit
ca8e5b0791
Notes:
sideshowbarker
2024-07-19 01:13:27 +09:00
Author: https://github.com/linusg
Commit: ca8e5b0791
Pull-request: https://github.com/SerenityOS/serenity/pull/4200
1 changed files with 1 additions and 4 deletions
|
@ -45,11 +45,8 @@ Regex<Parser>::Regex(StringView pattern, typename ParserTraits<Parser>::OptionsT
|
||||||
Parser parser(lexer, regex_options);
|
Parser parser(lexer, regex_options);
|
||||||
parser_result = parser.parse();
|
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);
|
matcher = make<Matcher<Parser>>(*this, regex_options);
|
||||||
} else {
|
|
||||||
fprintf(stderr, "%s\n", error_string().characters());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class Parser>
|
template<class Parser>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue