#[repr(C)]pub struct Message(/* private fields */);
Expand description
An error message.
Implementations§
Source§impl Message
impl Message
pub fn get<'s>(&self, scope: &mut HandleScope<'s>) -> Local<'s, String>
Sourcepub fn get_stack_trace<'s>(
&self,
scope: &mut HandleScope<'s>,
) -> Option<Local<'s, StackTrace>>
pub fn get_stack_trace<'s>( &self, scope: &mut HandleScope<'s>, ) -> Option<Local<'s, StackTrace>>
Exception stack trace. By default stack traces are not captured for uncaught exceptions. SetCaptureStackTraceForUncaughtExceptions allows to change this option.
pub fn get_source_line<'s>( &self, scope: &mut HandleScope<'s>, ) -> Option<Local<'s, String>>
Sourcepub fn get_script_resource_name<'s>(
&self,
scope: &mut HandleScope<'s>,
) -> Option<Local<'s, Value>>
pub fn get_script_resource_name<'s>( &self, scope: &mut HandleScope<'s>, ) -> Option<Local<'s, Value>>
Returns the resource name for the script from where the function causing the error originates.
Sourcepub fn get_line_number(&self, scope: &mut HandleScope<'_>) -> Option<usize>
pub fn get_line_number(&self, scope: &mut HandleScope<'_>) -> Option<usize>
Returns the number, 1-based, of the line where the error occurred.
Sourcepub fn get_start_position(&self) -> int
pub fn get_start_position(&self) -> int
Returns the index within the script of the first character where the error occurred.
Sourcepub fn get_end_position(&self) -> int
pub fn get_end_position(&self) -> int
Returns the index within the script of the last character where the error occurred.
Sourcepub fn get_wasm_function_index(&self) -> int
pub fn get_wasm_function_index(&self) -> int
Returns the Wasm function index where the error occurred. Returns -1 if message is not from a Wasm script.
Sourcepub fn error_level(&self) -> int
pub fn error_level(&self) -> int
Returns the error level of the message.
Sourcepub fn get_start_column(&self) -> usize
pub fn get_start_column(&self) -> usize
Returns the index within the line of the first character where the error occurred.
Sourcepub fn get_end_column(&self) -> usize
pub fn get_end_column(&self) -> usize
Returns the index within the line of the last character where the error occurred.
Passes on the value set by the embedder when it fed the script from which this Message was generated to V8.
pub fn is_opaque(&self) -> bool
Methods from Deref<Target = Data>§
Sourcepub fn get_hash(&self) -> int
pub fn get_hash(&self) -> int
Returns the V8 hash value for this value. The current implementation uses a hidden property to store the identity hash on some object types.
The return value will never be 0. Also, it is not guaranteed to be unique.
Sourcepub fn is_private(&self) -> bool
pub fn is_private(&self) -> bool
Returns true if this data is a Private
.
Sourcepub fn is_object_template(&self) -> bool
pub fn is_object_template(&self) -> bool
Returns true if this data is an ObjectTemplate
Sourcepub fn is_function_template(&self) -> bool
pub fn is_function_template(&self) -> bool
Returns true if this data is a FunctionTemplate.