diff options
author | Thomas Schilling <nominolo@googlemail.com> | 2008-11-22 13:06:58 +0000 |
---|---|---|
committer | Thomas Schilling <nominolo@googlemail.com> | 2008-11-22 13:06:58 +0000 |
commit | 1246293616fc45787ecaed13aa31a2555510f7e3 (patch) | |
tree | 2b05b8e556c8c43738e13227bd1191266f7fbca8 /ghc | |
parent | 348370462d762e64354ac430b4f973fcf1cb71dc (diff) | |
download | haskell-1246293616fc45787ecaed13aa31a2555510f7e3.tar.gz |
Change 'handleFlagWarnings' to throw exceptions instead of dying.
It now uses the standard warning log and error reporting mechanism.
Diffstat (limited to 'ghc')
-rw-r--r-- | ghc/Main.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ghc/Main.hs b/ghc/Main.hs index 766577eac8..06a5cebd92 100644 --- a/ghc/Main.hs +++ b/ghc/Main.hs @@ -153,7 +153,11 @@ main = let flagWarnings = staticFlagWarnings ++ modeFlagWarnings ++ dynamicFlagWarnings - liftIO $ handleFlagWarnings dflags2 flagWarnings + + handleSourceError (\e -> do + GHC.printExceptionAndWarnings e + liftIO $ exitWith (ExitFailure 1)) $ + handleFlagWarnings dflags2 flagWarnings -- make sure we clean up after ourselves GHC.defaultCleanupHandler dflags2 $ do |