Skip to main content

luaur_vm/functions/
lua_d_throw_ldo.rs

1//! Node: `cxx:Function:Luau.VM:VM/src/ldo.cpp:162:lua_d_throw`
2//! Source: `VM/src/ldo.cpp` (ldo.cpp:162-165, hand-ported; C++-exceptions build flavor,
3//! matching the catch_unwind-based luaD_rawrunprotected)
4
5use crate::records::lua_exception::lua_exception;
6use crate::type_aliases::lua_state::lua_State;
7
8#[allow(non_snake_case)]
9pub unsafe fn luaD_throw(l: *mut lua_State, errcode: core::ffi::c_int) -> ! {
10    std::panic::panic_any(lua_exception::lua_exception(l, errcode));
11}
12
13#[allow(unused_imports)]
14pub use luaD_throw as lua_d_throw;