[project @ 1999-02-04 11:54:08 by simonm]
authorsimonm <unknown>
Thu, 4 Feb 1999 11:54:08 +0000 (11:54 +0000)
committersimonm <unknown>
Thu, 4 Feb 1999 11:54:08 +0000 (11:54 +0000)
Don't go into an infinite loop for errors generated by hPutStr when
outputing an error message.  Use writeErrString__ to output all errors
(this won't generate a Haskell exception).

ghc/lib/std/PrelMain.lhs

index 4581ea3..05aae47 100644 (file)
@@ -35,10 +35,7 @@ real_handler :: Exception -> IO ()
 real_handler ex =
   case ex of
        ErrorCall s -> reportError s
-       other       -> hPutStr stderr (showsPrec 0 other "\n") >>
-                      _ccall_ stg_exit (1::Int)
-
--- calls to 'error' are treated slightly differently...
+       other       -> reportError (showsPrec 0 other "\n")
 
 reportError :: String -> IO ()
 reportError str = do