exception handling: exitWith ExitSuccess results in abnormal termination with Control.OldException
|Reported by:||int-e||Owned by:||igloo|
|Type of failure:||Test Case:|
|Related Tickets:||Differential Revisions:|
Consider this program.
import System.Exit import Control.OldException main = exitWith ExitSuccess `finally` return ()
It should not produce any output and return 0 as its exit code. Instead we get:
# runhaskell test.hs exit: ExitSuccess # echo $? 1
The problem is that finally catches the exception and rethrows it. In the process, the OldException module maps exceptions to old exceptions, but never maps them back when they're thrown.
Change History (4)
Changed 7 years ago by int-e
comment:1 follow-up: ↓ 2 Changed 7 years ago by igloo
- difficulty set to Unknown
- Milestone set to 6.10.1
- Owner set to igloo