pub enum CaughtError<'js> {
Exception(Exception<'js>),
Value(Value<'js>),
Error(Error),
Message(String),
}Expand description
An error type containing possible thrown exception values.
Variants§
Exception(Exception<'js>)
Error was an exception and an instance of Error
Value(Value<'js>)
Error was an exception but not an instance of Error.
Error(Error)
Error wasn’t an exception
Message(String)
A generic error message
Trait Implementations§
Source§impl<'js> Debug for CaughtError<'js>
impl<'js> Debug for CaughtError<'js>
Source§impl<'js> Display for CaughtError<'js>
impl<'js> Display for CaughtError<'js>
Source§impl<'js> Error for CaughtError<'js>
impl<'js> Error for CaughtError<'js>
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl<'js> Freeze for CaughtError<'js>
impl<'js> !RefUnwindSafe for CaughtError<'js>
impl<'js> !Send for CaughtError<'js>
impl<'js> !Sync for CaughtError<'js>
impl<'js> Unpin for CaughtError<'js>
impl<'js> !UnwindSafe for CaughtError<'js>
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