pub struct JsError {
pub name: Option<String>,
pub message: Option<String>,
pub stack: Option<String>,
pub cause: Option<Box<JsError>>,
pub exception_message: String,
pub frames: Vec<JsStackFrame>,
pub source_line: Option<String>,
pub source_line_frame_index: Option<usize>,
pub aggregated: Option<Vec<JsError>>,
}
Expand description
A JsError
represents an exception coming from V8, with stack frames and
line numbers. The deno_cli crate defines another JsError
type, which wraps
the one defined here, that adds source map support and colorful formatting.
When updating this struct, also update errors_are_equal_without_cause() in
fmt_error.rs.
Fields§
§name: Option<String>
§message: Option<String>
§stack: Option<String>
§cause: Option<Box<JsError>>
§exception_message: String
§frames: Vec<JsStackFrame>
§source_line: Option<String>
§source_line_frame_index: Option<usize>
§aggregated: Option<Vec<JsError>>
Implementations§
source§impl JsError
impl JsError
pub fn from_v8_exception( scope: &mut HandleScope<'_>, exception: Local<'_, Value> ) -> Self
pub fn from_v8_message<'a>( scope: &'a mut HandleScope<'_>, msg: Local<'a, Message> ) -> Self
Trait Implementations§
source§impl<'de> Deserialize<'de> for JsError
impl<'de> Deserialize<'de> for JsError
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Error for JsError
impl Error for JsError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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()
source§impl PartialEq<JsError> for JsError
impl PartialEq<JsError> for JsError
impl StructuralPartialEq for JsError
Auto Trait Implementations§
impl RefUnwindSafe for JsError
impl Send for JsError
impl Sync for JsError
impl Unpin for JsError
impl UnwindSafe for JsError
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