From 8fbccf0ef71cc22100d229dc09aecb0ae90deec0 Mon Sep 17 00:00:00 2001 From: simonmar Date: Wed, 23 May 2001 09:59:18 +0000 Subject: [PATCH 1/1] [project @ 2001-05-23 09:59:18 by simonmar] Don't catch ExitException at the top level, just re-throw it. --- ghc/compiler/main/Main.hs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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 -- 1.7.10.4