Improve error message when argument regex is not valid

master
Lennart Spitzner 2023-02-23 16:06:45 +01:00
parent fb24ad389c
commit ad1e8a0b12
1 changed files with 2 additions and 2 deletions

View File

@ -759,13 +759,13 @@ main = B.mainFromCmdParser $ do
let tx = t x
regexE <- PCRE.compile PCRE.compBlank PCRE.execBlank tx
case regexE of
Left err -> error $ show err
Left err -> error $ "failed parsing regex '" ++ x ++ "': " ++ show err
Right regex -> pure (joinMode, tx, regex)
compilerStop x = do
let tx = t x
regexE <- PCRE.compile PCRE.compBlank PCRE.execBlank tx
case regexE of
Left err -> error $ show err
Left err -> error $ "failed parsing regex '" ++ x ++ "': " ++ show err
Right regex -> pure regex
compiled_summarize <-
sequence