pub enum EvalError {
Syntax(String),
Throw(Value),
OutOfMemory,
}Expand description
Why Context::eval_detailed failed, keeping the thrown value intact.
The distinction from Error is the whole reason this type exists: an embedding has to
hand the thrown object back to its caller (the C API’s JS_GetException), and once it
has been turned into text that is no longer possible.
Variants§
Syntax(String)
The source did not compile. The text is already a rendered SyntaxError, because a
compile error has no object behind it — nothing ran, so there is nothing to throw.
Throw(Value)
The script threw this value.
OutOfMemory
The runtime ran out of memory.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for EvalError
impl !Send for EvalError
impl !Sync for EvalError
impl !UnwindSafe for EvalError
impl Forget for EvalError
impl Freeze for EvalError
impl Move for EvalError
impl Unpin for EvalError
impl UnsafeUnpin for EvalErrorwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const GcBox<JsString> is !null: UnsafeUnpin,
*const GcBox<JsObject> is !null: UnsafeUnpin,
*const GcBox<JsSymbol> is !null: UnsafeUnpin,
*const GcBox<BigInt> is !null: UnsafeUnpin,
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