v8 14.1.146 (node 25.0.0)
V8 is Google's open source JavaScript engine
Loading...
Searching...
No Matches
Exception Class Reference

#include <v8-exception.h>

Static Public Member Functions

static Local< Value > RangeError (Local< String > message, Local< Value > options={})
 
static Local< Value > ReferenceError (Local< String > message, Local< Value > options={})
 
static Local< Value > SyntaxError (Local< String > message, Local< Value > options={})
 
static Local< Value > TypeError (Local< String > message, Local< Value > options={})
 
static Local< Value > WasmCompileError (Local< String > message, Local< Value > options={})
 
static Local< Value > WasmLinkError (Local< String > message, Local< Value > options={})
 
static Local< Value > WasmRuntimeError (Local< String > message, Local< Value > options={})
 
static Local< Value > WasmSuspendError (Local< String > message, Local< Value > options={})
 
static Local< Value > Error (Local< String > message, Local< Value > options={})
 
static Local< Message > CreateMessage (Isolate *isolate, Local< Value > exception)
 
static Local< StackTrace > GetStackTrace (Local< Value > exception)
 
static Maybe< bool > CaptureStackTrace (Local< Context > context, Local< Object > object)
 

Detailed Description

Create new error objects by calling the corresponding error object constructor with the message.

Definition at line 32 of file v8-exception.h.

Member Function Documentation

◆ CaptureStackTrace()

static Maybe< bool > CaptureStackTrace ( Local< Context >  context,
Local< Object >  object 
)
static

Captures the current stack trace and attaches it to the given object in the form of stack property.

◆ CreateMessage()

static Local< Message > CreateMessage ( Isolate *  isolate,
Local< Value >  exception 
)
static

Creates an error message for the given exception. Will try to reconstruct the original stack trace from the exception value, or capture the current stack trace if not available.

◆ Error()

static Local< Value > Error ( Local< String >  message,
Local< Value >  options = {} 
)
static

◆ GetStackTrace()

static Local< StackTrace > GetStackTrace ( Local< Value >  exception)
static

Returns the original stack trace that was captured at the creation time of a given exception, or an empty handle if not available.

◆ RangeError()

static Local< Value > RangeError ( Local< String >  message,
Local< Value >  options = {} 
)
static

◆ ReferenceError()

static Local< Value > ReferenceError ( Local< String >  message,
Local< Value >  options = {} 
)
static

◆ SyntaxError()

static Local< Value > SyntaxError ( Local< String >  message,
Local< Value >  options = {} 
)
static

◆ TypeError()

static Local< Value > TypeError ( Local< String >  message,
Local< Value >  options = {} 
)
static

◆ WasmCompileError()

static Local< Value > WasmCompileError ( Local< String >  message,
Local< Value >  options = {} 
)
static

◆ WasmLinkError()

static Local< Value > WasmLinkError ( Local< String >  message,
Local< Value >  options = {} 
)
static

◆ WasmRuntimeError()

static Local< Value > WasmRuntimeError ( Local< String >  message,
Local< Value >  options = {} 
)
static

◆ WasmSuspendError()

static Local< Value > WasmSuspendError ( Local< String >  message,
Local< Value >  options = {} 
)
static

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