Skip to main content

error_poison_ptr_lazy

Function error_poison_ptr_lazy 

Source
pub fn error_poison_ptr_lazy(kind: u64) -> *mut u8
Expand description

Return a pre-allocated “lazy poison” Closure for a given error kind. Unlike error_poison_ptr(), this does NOT set the error flag at creation time. The error is only triggered when the closure is actually called (via poison_trampoline_lazy). This is critical for typeclass dictionaries where error methods exist as fields but may never be invoked.

kind: 0=DivisionByZero, 1=Overflow, 2=UserError, 3=Undefined, 4=TypeMetadata