packages feed

haskell-debugger-0.13.0.0: test/integration/exceptions/Main.hs

module Main where

import Control.Exception

main :: IO ()
main = do
  putStrLn "About to throw outer exception"
  catch throwOuter handler
  putStrLn "unreachable"

throwOuter :: IO ()
throwOuter = error "outer boom"

handler :: SomeException -> IO ()
handler se = do
  putStrLn ("Handling exception: " ++ displayException se)
  error "inner boom"