fix:repl: also catch IO errors like run nosuchfile
And print exceptions consistently, with a single newline.
This commit is contained in:
parent
9ecc3a56d0
commit
a1a6aad873
@ -180,9 +180,10 @@ runREPL defaultJournalOverride findBuiltinCommand = do
|
||||
Just input -> do
|
||||
liftIO $ (runCommand defaultJournalOverride findBuiltinCommand $ argsAddDoubleDash $ parseCommand input)
|
||||
`catches`
|
||||
[Handler (\(e::ErrorCall) -> putStr $ show e)
|
||||
,Handler (\(_::ExitCode) -> return ())
|
||||
,Handler (\UserInterrupt -> return ())
|
||||
[Handler (\(e::ErrorCall) -> putStrLn $ rstrip $ show e)
|
||||
,Handler (\(e::IOError) -> putStrLn $ rstrip $ show e)
|
||||
,Handler (\(_::ExitCode) -> return ())
|
||||
,Handler (\UserInterrupt -> return ())
|
||||
]
|
||||
loop prompt
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user