You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The C API should not throw C++ exceptions: languages that use the C ABI will likely not have any machinery for properly handling C++ stack unwinds when a C++ exception occurs across an FFI boundary.
For example, the C API crashes Rust programs when a C++ exception occurs:
A solution that doesn't require breaking changes would be wrapping all C++ function calls from a C API function (or the entirety of the C API function itself) in a try { ... } catch { ... } and handle any C++ exceptions by printing debugging information, then aborting.
The text was updated successfully, but these errors were encountered:
The C API should not throw C++ exceptions: languages that use the C ABI will likely not have any machinery for properly handling C++ stack unwinds when a C++ exception occurs across an FFI boundary.
For example, the C API crashes Rust programs when a C++ exception occurs:
This makes debugging particularly difficult.
A solution that doesn't require breaking changes would be wrapping all C++ function calls from a C API function (or the entirety of the C API function itself) in a
try { ... } catch { ... }
and handle any C++ exceptions by printing debugging information, then aborting.The text was updated successfully, but these errors were encountered: