projects
/
ghc-base.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2005-01-29 16:10:27 by wolfgang]
[ghc-base.git]
/
GHC
/
TopHandler.lhs
diff --git
a/GHC/TopHandler.lhs
b/GHC/TopHandler.lhs
index
7e5bca4
..
829752e
100644
(file)
--- a/
GHC/TopHandler.lhs
+++ b/
GHC/TopHandler.lhs
@@
-58,14
+58,15
@@
topHandler err = catchException (real_handler err) topHandler
--
real_handler :: Exception -> IO a
real_handler ex =
--
real_handler :: Exception -> IO a
real_handler ex =
+ cleanUp >>
case ex of
AsyncException StackOverflow -> do
reportStackOverflow
safeExit 2
-- only the main thread gets ExitException exceptions
case ex of
AsyncException StackOverflow -> do
reportStackOverflow
safeExit 2
-- only the main thread gets ExitException exceptions
- ExitException ExitSuccess -> cleanUp >> safeExit 0
- ExitException (ExitFailure n) -> cleanUp >> safeExit n
+ ExitException ExitSuccess -> safeExit 0
+ ExitException (ExitFailure n) -> safeExit n
other -> do
reportError other
other -> do
reportError other