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: &PinScope<'s, '_>, message: Local<'_, String>, ) -> Local<'s, Value>
pub fn range_error<'s>( scope: &PinScope<'s, '_>, message: Local<'_, String>, ) -> Local<'s, Value>
pub fn reference_error<'s>( scope: &PinScope<'s, '_>, message: Local<'_, String>, ) -> Local<'s, Value>
pub fn syntax_error<'s>( scope: &PinScope<'s, '_>, message: Local<'_, String>, ) -> Local<'s, Value>
pub fn type_error<'s>( scope: &PinScope<'s, '_>, message: Local<'_, String>, ) -> Local<'s, Value>
Sourcepub fn create_message<'s>(
scope: &PinScope<'s, '_>,
exception: Local<'_, Value>,
) -> Local<'s, Message>
pub fn create_message<'s>( scope: &PinScope<'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: &PinScope<'s, '_>,
exception: Local<'_, Value>,
) -> Option<Local<'s, StackTrace>>
pub fn get_stack_trace<'s>( scope: &PinScope<'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 Freeze for Exception
impl RefUnwindSafe for Exception
impl Send for Exception
impl Sync for Exception
impl Unpin for Exception
impl UnwindSafe for Exception
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more