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.
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
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()