Admin message

Due to a large amount of spam we do not allow new users to create repositories, they are "external" users. If you are a new user and want to create a repository, for example for forking GHC, open a new issue on ghc/ghc using the "get-verified" issue template

onException doesn't report original exception when exception is thrown in handler
Consider this program, you would expect `failingAction` to be reported in the backtrace since that is the user logic of the program. ``` import Control.Exception main :: IO () main = failingAction `onException` failingCleanup where failingAction = throwIO (ErrorCall "outer failure") failingCleanup = throwIO (ErrorCall "cleanup failure") ``` However, the resulting exception only reports the error which happens in the cleanup. This could mask the site of the original error. ``` +T28399: Uncaught exception ghc-internal:GHC.Internal.Exception.ErrorCall: + +cleanup failure + +HasCallStack backtrace: + throwIO, called at T28399.hs:<line>:<column> in <package-id>:Main ``` I think we probably want to annotate the handler whilst it is running. ``` onException :: IO a -> IO b -> IO a onException io what = io `catchExceptionNoPropagate` \e -> do - _ <- what + _ <- annotateIO (whileHandling e) what rethrowIO (e :: ExceptionWithContext SomeException) ```
issue