parent
f92b2fe6ef
commit
180f4baedb
@ -307,6 +307,8 @@ readJournal iopts mfile txt =
|
|||||||
tryReaders :: InputOpts -> Maybe FilePath -> [Reader] -> Text -> IO (Either String Journal)
|
tryReaders :: InputOpts -> Maybe FilePath -> [Reader] -> Text -> IO (Either String Journal)
|
||||||
tryReaders iopts mpath readers txt = firstSuccessOrFirstError [] readers
|
tryReaders iopts mpath readers txt = firstSuccessOrFirstError [] readers
|
||||||
where
|
where
|
||||||
|
-- TODO: #1087 when parsing csv with -f -, if the csv (rules) parser fails,
|
||||||
|
-- we would rather see that error, not the one from the journal parser
|
||||||
firstSuccessOrFirstError :: [String] -> [Reader] -> IO (Either String Journal)
|
firstSuccessOrFirstError :: [String] -> [Reader] -> IO (Either String Journal)
|
||||||
firstSuccessOrFirstError [] [] = return $ Left "no readers found"
|
firstSuccessOrFirstError [] [] = return $ Left "no readers found"
|
||||||
firstSuccessOrFirstError errs (r:rs) = do
|
firstSuccessOrFirstError errs (r:rs) = do
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user