Open Boddlnagg opened 6 years ago
Panics should generally never cross FFI boundaries (it's undefined behavior according to https://static.rust-lang.org/doc/master/std/panic/fn.catch_unwind.html).
Catch the panic using catch_unwind, and convert it into an appropriate HRESULT value (possibly E_FAIL).
catch_unwind
HRESULT
E_FAIL
Panics should generally never cross FFI boundaries (it's undefined behavior according to https://static.rust-lang.org/doc/master/std/panic/fn.catch_unwind.html).
Catch the panic using
catch_unwind
, and convert it into an appropriateHRESULT
value (possiblyE_FAIL
).