module vrt.os.eh.unwind
Exception handling using libunwind and DWARF.
Code Map
//! Exception handling using libunwind and DWARF.
module vrt.os.eh.unwind;
enum vrt_eh_return_0;
enum vrt_eh_return_1;
//! Our exception struct, we put the exception after, that seems to work,
//! everybody else puts it before.
struct vrt_eh_exception
{
public:
e: _Unwind_Exception;
t: Throwable;
}
//! Per thread callback for applications getting exceptions.
local lCallback: fn (Throwable, string) (void);
fn vrt_eh_set_callback(cb: fn (Throwable, string) (void)) { }
//! Throws an exception.
fn vrt_eh_throw(t: Throwable, location: string) { }
fn vrt_eh_rethrow(t: Throwable) { }
fn vrt_eh_throw_assert_error(location: string, msg: string) { }
fn vrt_eh_throw_slice_error(location: string) { }
fn vrt_eh_throw_key_not_found_error(location: string) { }
//! Mandated by the ABI, not needed for Volt.
fn vrt_eh_delete(reason: _Unwind_Reason_Code, exceptionObject: _Unwind_Exception*) { }
//! Big do everything function.
fn vrt_eh_personality_v0_real(ver: i32, actions: _Unwind_Action, exceptionClass: u64, exceptionObject: _Unwind_Exception*, ctx: _Unwind_Context*) _Unwind_Reason_Code { }
fn vrt_eh_install_action(ip: uintptr_t, actions: _Unwind_Action, switchVal: uintptr_t, t: Throwable, ctx: _Unwind_Context*) _Unwind_Reason_Code { }
fn vrt_eh_install_finally(ip: uintptr_t, actions: _Unwind_Action, exceptionObject: _Unwind_Exception*, ctx: _Unwind_Context*) _Unwind_Reason_Code { }
struct vrt_eh_exception
Our exception struct, we put the exception after, that seems to work, everybody else puts it before.
local lCallback: fn (Throwable, string) (void)
Per thread callback for applications getting exceptions.
fn vrt_eh_throw(t: Throwable, location: string)
Throws an exception.
fn vrt_eh_delete(reason: _Unwind_Reason_Code, exceptionObject: _Unwind_Exception*)
Mandated by the ABI, not needed for Volt.
fn vrt_eh_personality_v0_real(ver: i32, actions: _Unwind_Action, exceptionClass: u64, exceptionObject: _Unwind_Exception*, ctx: _Unwind_Context*) _Unwind_Reason_Code
Big do everything function.