pub struct Exception;
Expand description
Create new error objects by calling the corresponding error object constructor with the message.
Implementations
sourceimpl 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.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Exception
impl Send for Exception
impl Sync for Exception
impl Unpin for Exception
impl UnwindSafe for Exception
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more