Rodrigo Mesquita pushed to branch wip/romes/26058 at Glasgow Haskell Compiler / GHC
Commits:
-
e55d13db
by Rodrigo Mesquita at 2025-06-17T13:54:03+01:00
6 changed files:
- libraries/base/src/Control/Exception.hs
- libraries/ghc-internal/src/GHC/Internal/Exception/Type.hs
- testsuite/tests/interface-stability/base-exports.stdout
- testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs
- testsuite/tests/interface-stability/base-exports.stdout-mingw32
- testsuite/tests/interface-stability/base-exports.stdout-ws-32
Changes:
| ... | ... | @@ -116,7 +116,9 @@ module Control.Exception |
| 116 | 116 | bracket_,
|
| 117 | 117 | bracketOnError,
|
| 118 | 118 | finally,
|
| 119 | - onException
|
|
| 119 | + onException,
|
|
| 120 | + -- ** Printing
|
|
| 121 | + displayExceptionWithInfo
|
|
| 120 | 122 | |
| 121 | 123 | ) where
|
| 122 | 124 |
| ... | ... | @@ -246,7 +246,7 @@ instance Exception SomeException where |
| 246 | 246 | -- * The exception context
|
| 247 | 247 | --
|
| 248 | 248 | -- By default, 'uncaughtExceptionHandler' uses 'displayExceptionWithInfo' to print uncaught exceptions.
|
| 249 | --- This default can be overriden with 'setUncaughtExceptionHandler', for
|
|
| 249 | +-- This default can be overridden with 'setUncaughtExceptionHandler', for
|
|
| 250 | 250 | -- instance, to present custom error messages on exceptions to the user.
|
| 251 | 251 | --
|
| 252 | 252 | -- @since base-4.21
|
| ... | ... | @@ -285,6 +285,7 @@ module Control.Exception where |
| 285 | 285 | catchJust :: forall e b a. Exception e => (e -> GHC.Internal.Maybe.Maybe b) -> GHC.Internal.Types.IO a -> (b -> GHC.Internal.Types.IO a) -> GHC.Internal.Types.IO a
|
| 286 | 286 | catchNoPropagate :: forall e a. Exception e => GHC.Internal.Types.IO a -> (ExceptionWithContext e -> GHC.Internal.Types.IO a) -> GHC.Internal.Types.IO a
|
| 287 | 287 | catches :: forall a. GHC.Internal.Types.IO a -> [Handler a] -> GHC.Internal.Types.IO a
|
| 288 | + displayExceptionWithInfo :: SomeException -> GHC.Internal.Base.String
|
|
| 288 | 289 | evaluate :: forall a. a -> GHC.Internal.Types.IO a
|
| 289 | 290 | finally :: forall a b. GHC.Internal.Types.IO a -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO a
|
| 290 | 291 | getMaskingState :: GHC.Internal.Types.IO MaskingState
|
| ... | ... | @@ -285,6 +285,7 @@ module Control.Exception where |
| 285 | 285 | catchJust :: forall e b a. Exception e => (e -> GHC.Internal.Maybe.Maybe b) -> GHC.Internal.Types.IO a -> (b -> GHC.Internal.Types.IO a) -> GHC.Internal.Types.IO a
|
| 286 | 286 | catchNoPropagate :: forall e a. Exception e => GHC.Internal.Types.IO a -> (ExceptionWithContext e -> GHC.Internal.Types.IO a) -> GHC.Internal.Types.IO a
|
| 287 | 287 | catches :: forall a. GHC.Internal.Types.IO a -> [Handler a] -> GHC.Internal.Types.IO a
|
| 288 | + displayExceptionWithInfo :: SomeException -> GHC.Internal.Base.String
|
|
| 288 | 289 | evaluate :: forall a. a -> GHC.Internal.Types.IO a
|
| 289 | 290 | finally :: forall a b. GHC.Internal.Types.IO a -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO a
|
| 290 | 291 | getMaskingState :: GHC.Internal.Types.IO MaskingState
|
| ... | ... | @@ -285,6 +285,7 @@ module Control.Exception where |
| 285 | 285 | catchJust :: forall e b a. Exception e => (e -> GHC.Internal.Maybe.Maybe b) -> GHC.Internal.Types.IO a -> (b -> GHC.Internal.Types.IO a) -> GHC.Internal.Types.IO a
|
| 286 | 286 | catchNoPropagate :: forall e a. Exception e => GHC.Internal.Types.IO a -> (ExceptionWithContext e -> GHC.Internal.Types.IO a) -> GHC.Internal.Types.IO a
|
| 287 | 287 | catches :: forall a. GHC.Internal.Types.IO a -> [Handler a] -> GHC.Internal.Types.IO a
|
| 288 | + displayExceptionWithInfo :: SomeException -> GHC.Internal.Base.String
|
|
| 288 | 289 | evaluate :: forall a. a -> GHC.Internal.Types.IO a
|
| 289 | 290 | finally :: forall a b. GHC.Internal.Types.IO a -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO a
|
| 290 | 291 | getMaskingState :: GHC.Internal.Types.IO MaskingState
|
| ... | ... | @@ -285,6 +285,7 @@ module Control.Exception where |
| 285 | 285 | catchJust :: forall e b a. Exception e => (e -> GHC.Internal.Maybe.Maybe b) -> GHC.Internal.Types.IO a -> (b -> GHC.Internal.Types.IO a) -> GHC.Internal.Types.IO a
|
| 286 | 286 | catchNoPropagate :: forall e a. Exception e => GHC.Internal.Types.IO a -> (ExceptionWithContext e -> GHC.Internal.Types.IO a) -> GHC.Internal.Types.IO a
|
| 287 | 287 | catches :: forall a. GHC.Internal.Types.IO a -> [Handler a] -> GHC.Internal.Types.IO a
|
| 288 | + displayExceptionWithInfo :: SomeException -> GHC.Internal.Base.String
|
|
| 288 | 289 | evaluate :: forall a. a -> GHC.Internal.Types.IO a
|
| 289 | 290 | finally :: forall a b. GHC.Internal.Types.IO a -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO a
|
| 290 | 291 | getMaskingState :: GHC.Internal.Types.IO MaskingState
|