Commit ec7a80bf authored by simonmar's avatar simonmar
Browse files

[project @ 2002-04-04 08:49:46 by simonmar]

An I/O error while opening/writing the output file is *not* a panic.
parent 92254299
......@@ -93,12 +93,7 @@ codeOutput dflags mod_name tycons core_binds stg_binds
doOutput :: String -> (Handle -> IO ()) -> IO ()
doOutput filenm io_action
= (do handle <- openFile filenm WriteMode
io_action handle
hClose handle)
`catch` (\err -> pprPanic "Failed to open or write code output file"
(text filenm))
doOutput filenm io_action = bracket (openFile filenm WriteMode) hClose io_action
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment