1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//! `cxx` spike bridge proving a custom `trycatch` widens the bridge's exception boundary
//! (`bridge::ext_*`).
//!
//! A hand-written `cxx_build` bridge (not the `cxx-gen` one, which inlines the `trycatch`
//! definition and complicates the override): a custom
//! [`rust::behavior::trycatch`](https://docs.rs/cxx) in `facade/testonly_probe_ext.h` makes this
//! bridge's shims catch more than cxx's stock `std::exception`. A non-`std::exception` throw
//! ([`ext_throw_plain_int`]) becomes an `Err` instead of a `std::terminate`, and an `interr_exc_t`
//! ([`ext_throw_interr`]) carries its code in the message rather than the base `what()`'s
//! uninformative `"std::exception"`.
//!
//! The C++ side (custom `trycatch`, probe bodies) is `facade/testonly_probe_ext.{h,cpp}`. Kept off the
//! public API by `#[doc(hidden)]` like [`bridge_probe`](crate::bridge_probe) and
//! [`bridge_cfunc`](crate::bridge_cfunc).
// cxx::bridge's own expansion mis-attributes a missing_errors_doc warning to this attribute's
// own span, though every Result-returning fn below already documents its `Err` condition.
// The custom trycatch here is also productionized as the shared `facade/trycatch.h`, which
// every production bridge includes (plus a scoped `set_interr_throws` arm). This spike keeps its own
// inline copy so its throwing probes stay self-contained.
pub use ;