v8  10.1.124 (node 18.2.0)
V8 is Google's open source JavaScript engine
Message Class Reference

#include <v8-message.h>

Public Member Functions

Local< StringGet () const
 
IsolateGetIsolate () const
 
V8_WARN_UNUSED_RESULT MaybeLocal< StringGetSource (Local< Context > context) const
 
V8_WARN_UNUSED_RESULT MaybeLocal< StringGetSourceLine (Local< Context > context) const
 
ScriptOrigin GetScriptOrigin () const
 
Local< ValueGetScriptResourceName () const
 
Local< StackTraceGetStackTrace () const
 
V8_WARN_UNUSED_RESULT Maybe< int > GetLineNumber (Local< Context > context) const
 
int GetStartPosition () const
 
int GetEndPosition () const
 
int GetWasmFunctionIndex () const
 
int ErrorLevel () const
 
int GetStartColumn () const
 
V8_WARN_UNUSED_RESULT Maybe< int > GetStartColumn (Local< Context > context) const
 
int GetEndColumn () const
 
V8_WARN_UNUSED_RESULT Maybe< int > GetEndColumn (Local< Context > context) const
 
bool IsSharedCrossOrigin () const
 
bool IsOpaque () const
 

Static Public Member Functions

static void PrintCurrentStackTrace (Isolate *isolate, std::ostream &out)
 

Static Public Attributes

static const int kNoLineNumberInfo = 0
 
static const int kNoColumnInfo = 0
 
static const int kNoScriptIdInfo = 0
 
static const int kNoWasmFunctionIndexInfo = -1
 

Detailed Description

An error message.

Definition at line 110 of file v8-message.h.

Member Function Documentation

◆ ErrorLevel()

int ErrorLevel ( ) const

Returns the error level of the message.

◆ Get()

Local<String> Get ( ) const

◆ GetEndColumn() [1/2]

int GetEndColumn ( ) const

Returns the index within the line of the last character where the error occurred.

◆ GetEndColumn() [2/2]

V8_WARN_UNUSED_RESULT Maybe<int> GetEndColumn ( Local< Context context) const

◆ GetEndPosition()

int GetEndPosition ( ) const

Returns the index within the script of the last character where the error occurred.

◆ GetIsolate()

Isolate* GetIsolate ( ) const

Return the isolate to which the Message belongs.

◆ GetLineNumber()

V8_WARN_UNUSED_RESULT Maybe<int> GetLineNumber ( Local< Context context) const

Returns the number, 1-based, of the line where the error occurred.

◆ GetScriptOrigin()

ScriptOrigin GetScriptOrigin ( ) const

Returns the origin for the script from where the function causing the error originates.

◆ GetScriptResourceName()

Local<Value> GetScriptResourceName ( ) const

Returns the resource name for the script from where the function causing the error originates.

◆ GetSource()

V8_WARN_UNUSED_RESULT MaybeLocal<String> GetSource ( Local< Context context) const

◆ GetSourceLine()

V8_WARN_UNUSED_RESULT MaybeLocal<String> GetSourceLine ( Local< Context context) const

◆ GetStackTrace()

Local<StackTrace> GetStackTrace ( ) const

Exception stack trace. By default stack traces are not captured for uncaught exceptions. SetCaptureStackTraceForUncaughtExceptions allows to change this option.

◆ GetStartColumn() [1/2]

int GetStartColumn ( ) const

Returns the index within the line of the first character where the error occurred.

◆ GetStartColumn() [2/2]

V8_WARN_UNUSED_RESULT Maybe<int> GetStartColumn ( Local< Context context) const

◆ GetStartPosition()

int GetStartPosition ( ) const

Returns the index within the script of the first character where the error occurred.

◆ GetWasmFunctionIndex()

int GetWasmFunctionIndex ( ) const

Returns the Wasm function index where the error occurred. Returns -1 if message is not from a Wasm script.

◆ IsOpaque()

bool IsOpaque ( ) const

◆ IsSharedCrossOrigin()

bool IsSharedCrossOrigin ( ) const

Passes on the value set by the embedder when it fed the script from which this Message was generated to V8.

◆ PrintCurrentStackTrace()

static void PrintCurrentStackTrace ( Isolate isolate,
std::ostream &  out 
)
static

Field Documentation

◆ kNoColumnInfo

const int kNoColumnInfo = 0
static

Definition at line 195 of file v8-message.h.

◆ kNoLineNumberInfo

const int kNoLineNumberInfo = 0
static

Definition at line 194 of file v8-message.h.

◆ kNoScriptIdInfo

const int kNoScriptIdInfo = 0
static

Definition at line 196 of file v8-message.h.

◆ kNoWasmFunctionIndexInfo

const int kNoWasmFunctionIndexInfo = -1
static

Definition at line 197 of file v8-message.h.


The documentation for this class was generated from the following file: