#[non_exhaustive]pub struct Exception {
pub message: String,
pub stack: Option<String>,
pub thrown: Option<JsonValue>,
}Expand description
What a JS function threw (Callback::call_async_traced): its message
and, for an Error, the stack where it was made ( at f (bundle.js:12:5) lines, the bundle’s positions).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.message: StringThe message (an Error’s message, else the value as a string).
stack: Option<String>The stack, for an Error.
thrown: Option<JsonValue>What was thrown, as JSON, for checks of it (nsh/test’s toThrow,
toMatchObject): an object’s own enumerable properties (an
Error’s code, …) with its name and message, any other
value as itself; None when Rust made the error (a conversion’s),
and for a call that is not traced ([JsCall::traced]).
Trait Implementations§
impl Eq for Exception
impl StructuralPartialEq for Exception
Auto Trait Implementations§
impl Forget for Exception
impl Freeze for Exceptionwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Value>: Freeze,
*const LeafNode<String, Value> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, Value)>>: Freeze,
impl Move for Exception
impl RefUnwindSafe for Exception
impl Send for Exception
impl Sync for Exception
impl Unpin for Exception
impl UnsafeUnpin for Exceptionwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
*const LeafNode<String, Value> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Value)>>: UnsafeUnpin,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<E> IntoThrown for Ewhere
E: Display,
impl<E> IntoThrown for Ewhere
E: Display,
Source§fn into_thrown(self) -> Thrown
fn into_thrown(self) -> Thrown
The exception.