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:
parent
952c0dc2a0
commit
ca8e5b0791
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_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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue