Mark ffi interface functions as noexcept #1872
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Mark Rust ffi function as noexcept to prevent exception propagation to Rust code. Any unhandled exceptions will result in direct call to terminate().
This commit adds a custom terminate handler that provides detailed diagnostics when std::terminate() is called. This helps debug issues where exceptions escape noexcept functions or cross FFI boundaries.
The handler is installed via monad_set_terminate_handler() which should be called early in main() before any exception-throwing code.
This code was generated using Claude Sonnet 4.5