diff --git a/src/Cryptol/REPL/Command.hs b/src/Cryptol/REPL/Command.hs index d2925092..329b276f 100644 --- a/src/Cryptol/REPL/Command.hs +++ b/src/Cryptol/REPL/Command.hs @@ -317,8 +317,10 @@ dumpTestsCmd outFile str = do argOut <- mapM (rEval . E.ppValue ppopts) args resOut <- rEval (E.ppValue ppopts x) return (renderOneLine resOut ++ "\t" ++ intercalate "\t" (map renderOneLine argOut) ++ "\n") - io $ writeFile outFile (concat out) - + io $ writeFile outFile (concat out) `X.catch` handler + where + handler :: X.SomeException -> IO () + handler e = putStrLn (X.displayException e)