pub struct ScriptError {
pub message: String,
pub source_name: Option<String>,
pub line: Option<u32>,
pub column: Option<u32>,
pub stack: Option<String>,
}Expand description
A JavaScript exception with engine-provided provenance.
The QuickJS error value’s message and stack are captured. Stack frames
that reference the invocation’s script name are line-adjusted so line
numbers refer to the user’s script text (the injected argument / content
prologue is subtracted), mirroring the OverPy reference behavior
(normalizeScriptError in src/quickjs.ts).
Fields§
§message: StringThe exception message (e.g. "kaboom"). Resource-limit abort messages
are "interrupted", "out of memory", and
"Maximum call stack size exceeded".
source_name: Option<String>The script name the invocation was attributed to.
line: Option<u32>1-based line in the user’s script of the first stack frame matching
source_name, when the engine provided a stack.
column: Option<u32>1-based column of that frame, when available.
stack: Option<String>The engine stack trace with line numbers adjusted to the user’s script, when the engine provided one.
Trait Implementations§
Source§impl Clone for ScriptError
impl Clone for ScriptError
Source§fn clone(&self) -> ScriptError
fn clone(&self) -> ScriptError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more