thc:runtime
Copyright(C) 2026 Edward Kmett
LicenseUPL-1.0 AND BSD-3-Clause
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityexperimental
PortabilityGHC FFI; THC runtime services or native fallback implementation
Safe HaskellTrustworthy
LanguageHaskell2010

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.

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.