Improve error message when argument regex is not valid
parent
fb24ad389c
commit
ad1e8a0b12
|
@ -759,13 +759,13 @@ main = B.mainFromCmdParser $ do
|
||||||
let tx = t x
|
let tx = t x
|
||||||
regexE <- PCRE.compile PCRE.compBlank PCRE.execBlank tx
|
regexE <- PCRE.compile PCRE.compBlank PCRE.execBlank tx
|
||||||
case regexE of
|
case regexE of
|
||||||
Left err -> error $ show err
|
Left err -> error $ "failed parsing regex '" ++ x ++ "': " ++ show err
|
||||||
Right regex -> pure (joinMode, tx, regex)
|
Right regex -> pure (joinMode, tx, regex)
|
||||||
compilerStop x = do
|
compilerStop x = do
|
||||||
let tx = t x
|
let tx = t x
|
||||||
regexE <- PCRE.compile PCRE.compBlank PCRE.execBlank tx
|
regexE <- PCRE.compile PCRE.compBlank PCRE.execBlank tx
|
||||||
case regexE of
|
case regexE of
|
||||||
Left err -> error $ show err
|
Left err -> error $ "failed parsing regex '" ++ x ++ "': " ++ show err
|
||||||
Right regex -> pure regex
|
Right regex -> pure regex
|
||||||
compiled_summarize <-
|
compiled_summarize <-
|
||||||
sequence
|
sequence
|
||||||
|
|
Loading…
Reference in New Issue