mirror of
https://github.com/GaloisInc/cryptol.git
synced 2024-12-15 02:01:39 +03:00
More friendly handling of errors writing files from :dumptests
This commit is contained in:
parent
508327058b
commit
209686bb60
@ -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)
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user