Jule C++ Interop: Containment of Foreign Exceptions in Version 0.6.2
0 reputation · 22 Oct 2025, 10:38 UTC
Goal
To determine how Jule handles C++ exceptions thrown from foreign code when invoked from Jule, focusing on the containment rule at the interop edge.
Constraints & Uncertainty
Jule emits C++ and relies on a C++ toolchain, so the C++ ABI and exception handling semantics are observable compatibility surfaces. The current documentation does not specify whether a C++ exception must be converted to a Jule error type or may propagate through Jule error‑handling frames. Build configuration (target, optimization level, module layout) can influence emitted code and ABI assumptions, making behavior comparable only within a pinned toolchain.
Questions
- In Jule 0.6.2, does a C++ exception thrown by a foreign function automatically convert to a Jule error, or is it allowed to escape into the Jule runtime?
- Is there a documented containment rule that changes when the C++ compiler or standard library is upgraded?
- How does build configuration (e.g., optimization level or module layout) affect the propagation or containment of foreign exceptions?