pub struct Exception;
Expand description
Create new error objects by calling the corresponding error object constructor with the message.
Implementations§
source§impl Exception
impl Exception
pub fn error<'s>(
scope: &mut HandleScope<'s>,
message: Local<'_, String>
) -> Local<'s, Value>
pub fn range_error<'s>(
scope: &mut HandleScope<'s>,
message: Local<'_, String>
) -> Local<'s, Value>
pub fn reference_error<'s>(
scope: &mut HandleScope<'s>,
message: Local<'_, String>
) -> Local<'s, Value>
pub fn syntax_error<'s>(
scope: &mut HandleScope<'s>,
message: Local<'_, String>
) -> Local<'s, Value>
pub fn type_error<'s>(
scope: &mut HandleScope<'s>,
message: Local<'_, String>
) -> Local<'s, Value>
sourcepub fn create_message<'s>(
scope: &mut HandleScope<'s>,
exception: Local<'_, Value>
) -> Local<'s, Message>
pub fn create_message<'s>(
scope: &mut HandleScope<'s>,
exception: Local<'_, Value>
) -> Local<'s, Message>
Creates an error message for the given exception. Will try to reconstruct the original stack trace from the exception value, or capture the current stack trace if not available.
sourcepub fn get_stack_trace<'s>(
scope: &mut HandleScope<'s>,
exception: Local<'_, Value>
) -> Option<Local<'s, StackTrace>>
pub fn get_stack_trace<'s>(
scope: &mut HandleScope<'s>,
exception: Local<'_, Value>
) -> Option<Local<'s, StackTrace>>
Returns the original stack trace that was captured at the creation time of a given exception, or an empty handle if not available.