| Copyright | (C) 2026 Edward Kmett |
|---|---|
| License | UPL-1.0 AND BSD-3-Clause |
| Maintainer | Edward Kmett <ekmett@gmail.com> |
| Stability | experimental |
| Portability | GHC FFI; THC runtime services or native fallback implementation |
| Safe Haskell | Trustworthy |
| Language | Haskell2010 |
THC.Exception
Description
Handle admitted foreign-language application failures with ordinary Haskell
Control.Exception.catch, Control.Exception.try and cleanup combinators.
Internal runtime faults, cancellation and fatal host errors remain uncatchable
through this bridge. Inspection is in IO; pure display is inert.
Synopsis
Documentation
data ForeignException Source #
The runtime owns the opaque foreign object; this newtype gives it a genuine compiled Haskell Exception dictionary without exposing its representation.
Instances
| Exception ForeignException # | |
Defined in THC.Internal.Exception Methods toException :: ForeignException -> SomeException # fromException :: SomeException -> Maybe ForeignException # | |
| Show ForeignException # | |
Defined in THC.Internal.Exception Methods showsPrec :: Int -> ForeignException -> ShowS # show :: ForeignException -> String # showList :: [ForeignException] -> ShowS # | |
foreignExceptionType :: ForeignException -> IO (Maybe String) Source #
The foreign type name, when the language makes one available.
foreignExceptionMessage :: ForeignException -> IO (Maybe String) Source #
A snapshot of the foreign message. Querying metadata may execute foreign language code. Admitted foreign application failures are converted automatically.