Skip to content

Commit cbbbf69

Browse files
committed
improve error message
1 parent 4e8b75b commit cbbbf69

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

logprep/filter/expression/filter_expression.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,9 @@ def _normalize_regex(regex: str) -> str:
340340
end_token = "$"
341341
match = RegExFilterExpression.match_parts_pattern.match(regex)
342342
if match is None: # pragma: no cover
343-
raise FilterExpressionError("regex is designed to always match")
343+
raise FilterExpressionError(
344+
f"Internal error: regex is designed to always match: '{regex!r}'"
345+
)
344346
flag, _, pattern = match.groups()
345347
flag = "" if flag is None else flag
346348
pattern = "" if pattern is None else pattern

0 commit comments

Comments
 (0)