Skip to main content

throw_named

Function throw_named 

Source
pub fn throw_named<'js>(
    ctx: &Ctx<'js>,
    name: &str,
    message: impl Into<String>,
) -> Error
Expand description

Throw an Error carrying a specific name (TypeError, RangeError, …). QuickJS’s own constructors are used so the thrown value is a real Error with a stack.