From: simonmar Date: Wed, 23 May 2001 09:59:18 +0000 (+0000) Subject: [project @ 2001-05-23 09:59:18 by simonmar] X-Git-Tag: Approximately_9120_patches~1890 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=8fbccf0ef71cc22100d229dc09aecb0ae90deec0;p=ghc-hetmet.git [project @ 2001-05-23 09:59:18 by simonmar] Don't catch ExitException at the top level, just re-throw it. --- diff --git a/ghc/compiler/main/Main.hs b/ghc/compiler/main/Main.hs index 4678065..3379bd9 100644 --- a/ghc/compiler/main/Main.hs +++ b/ghc/compiler/main/Main.hs @@ -1,6 +1,6 @@ {-# OPTIONS -fno-warn-incomplete-patterns #-} ----------------------------------------------------------------------------- --- $Id: Main.hs,v 1.64 2001/05/08 10:58:48 simonmar Exp $ +-- $Id: Main.hs,v 1.65 2001/05/23 09:59:18 simonmar Exp $ -- -- GHC Driver program -- @@ -87,8 +87,13 @@ import Maybe main = -- top-level exception handler: any unrecognised exception is a compiler bug. - handle (\exception -> do hPutStr stderr (show (Panic (show exception))) - exitWith (ExitFailure 1) + handle (\exception -> + case exception of +#if __GLASGOW_HASKELL__ >= 501 + ExitException _ -> throw exception +#endif + _other -> do hPutStr stderr (show (Panic (show exception))) + exitWith (ExitFailure 1) ) $ do -- all error messages are propagated as exceptions