alef 0.81.0

Opinionated polyglot binding generator for Rust libraries
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

{% if not trivial_call %}
    })) {
{% endif %}
        Ok(value) => value,
        Err(_) => {
            // A panic can unwind past code that already reported a more specific error via
            // set_last_error/set_handle_error (e.g. a conversion failure right before an
            // unrelated panic deeper in the same call); only stamp the generic panic marker
            // when nothing more specific is already recorded, so that context survives. ~keep
            if LAST_ERROR_CODE.with_borrow(|c| *c == 0) {
                let _ = std::panic::catch_unwind(std::panic::AssertUnwindSafe(set_panic_error));
            }
            {{ panic_return }}
        }
    }
}