v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::internal::ErrorUtils Class Reference

#include <messages.h>

Inheritance diagram for v8::internal::ErrorUtils:
Collaboration diagram for v8::internal::ErrorUtils:

Classes

struct  StackPropertyLookupResult
 

Public Types

enum class  StackTraceCollection { kEnabled , kDisabled }
 
enum class  ToStringMessageSource { kPreferOriginalMessage , kCurrentMessageProperty }
 

Static Public Member Functions

static MaybeDirectHandle< JSObjectConstruct (Isolate *isolate, DirectHandle< JSFunction > target, DirectHandle< Object > new_target, DirectHandle< Object > message, DirectHandle< Object > options)
 
static MaybeHandle< JSObjectConstruct (Isolate *isolate, DirectHandle< JSFunction > target, DirectHandle< Object > new_target, DirectHandle< Object > message, DirectHandle< Object > options, FrameSkipMode mode, DirectHandle< Object > caller, StackTraceCollection stack_trace_collection)
 
static V8_EXPORT_PRIVATE MaybeHandle< StringToString (Isolate *isolate, DirectHandle< Object > recv, ToStringMessageSource message_source=ToStringMessageSource::kCurrentMessageProperty)
 
static Handle< JSObjectMakeGenericError (Isolate *isolate, DirectHandle< JSFunction > constructor, MessageTemplate index, base::Vector< const DirectHandle< Object > > args, FrameSkipMode mode)
 
static DirectHandle< JSObjectShadowRealmConstructTypeErrorCopy (Isolate *isolate, DirectHandle< Object > original, MessageTemplate index, base::Vector< const DirectHandle< Object > > args)
 
static MaybeDirectHandle< ObjectFormatStackTrace (Isolate *isolate, DirectHandle< JSObject > error, DirectHandle< Object > stack_trace)
 
static DirectHandle< JSObjectNewIteratorError (Isolate *isolate, DirectHandle< Object > source)
 
static DirectHandle< JSObjectNewCalledNonCallableError (Isolate *isolate, DirectHandle< Object > source)
 
static DirectHandle< JSObjectNewConstructedNonConstructable (Isolate *isolate, DirectHandle< Object > source)
 
static Tagged< ObjectThrowSpreadArgError (Isolate *isolate, MessageTemplate id, DirectHandle< Object > object)
 
static Tagged< ObjectThrowLoadFromNullOrUndefined (Isolate *isolate, DirectHandle< Object > object, MaybeDirectHandle< Object > key)
 
static bool HasErrorStackSymbolOwnProperty (Isolate *isolate, DirectHandle< JSObject > object)
 
static StackPropertyLookupResult GetErrorStackProperty (Isolate *isolate, DirectHandle< JSReceiver > maybe_error_object)
 
static MaybeDirectHandle< ObjectGetFormattedStack (Isolate *isolate, DirectHandle< JSObject > maybe_error_object)
 
static void SetFormattedStack (Isolate *isolate, DirectHandle< JSObject > maybe_error_object, DirectHandle< Object > formatted_stack)
 
static MaybeHandle< ObjectCaptureStackTrace (Isolate *isolate, DirectHandle< JSObject > object, FrameSkipMode mode, Handle< Object > caller)
 

Detailed Description

Definition at line 74 of file messages.h.

Member Enumeration Documentation

◆ StackTraceCollection

Enumerator
kEnabled 
kDisabled 

Definition at line 78 of file messages.h.

◆ ToStringMessageSource

Enumerator
kPreferOriginalMessage 
kCurrentMessageProperty 

Definition at line 90 of file messages.h.

Member Function Documentation

◆ CaptureStackTrace()

MaybeHandle< Object > v8::internal::ErrorUtils::CaptureStackTrace ( Isolate * isolate,
DirectHandle< JSObject > object,
FrameSkipMode mode,
Handle< Object > caller )
static

Definition at line 1216 of file messages.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Construct() [1/2]

MaybeDirectHandle< JSObject > v8::internal::ErrorUtils::Construct ( Isolate * isolate,
DirectHandle< JSFunction > target,
DirectHandle< Object > new_target,
DirectHandle< Object > message,
DirectHandle< Object > options )
static

Definition at line 528 of file messages.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Construct() [2/2]

MaybeHandle< JSObject > v8::internal::ErrorUtils::Construct ( Isolate * isolate,
DirectHandle< JSFunction > target,
DirectHandle< Object > new_target,
DirectHandle< Object > message,
DirectHandle< Object > options,
FrameSkipMode mode,
DirectHandle< Object > caller,
StackTraceCollection stack_trace_collection )
static

Definition at line 548 of file messages.cc.

Here is the call graph for this function:

◆ FormatStackTrace()

MaybeDirectHandle< Object > v8::internal::ErrorUtils::FormatStackTrace ( Isolate * isolate,
DirectHandle< JSObject > error,
DirectHandle< Object > stack_trace )
static

Definition at line 287 of file messages.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetErrorStackProperty()

ErrorUtils::StackPropertyLookupResult v8::internal::ErrorUtils::GetErrorStackProperty ( Isolate * isolate,
DirectHandle< JSReceiver > maybe_error_object )
static

Definition at line 1132 of file messages.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetFormattedStack()

MaybeDirectHandle< Object > v8::internal::ErrorUtils::GetFormattedStack ( Isolate * isolate,
DirectHandle< JSObject > maybe_error_object )
static

Definition at line 1147 of file messages.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HasErrorStackSymbolOwnProperty()

bool v8::internal::ErrorUtils::HasErrorStackSymbolOwnProperty ( Isolate * isolate,
DirectHandle< JSObject > object )
static

Definition at line 1118 of file messages.cc.

Here is the call graph for this function:

◆ MakeGenericError()

Handle< JSObject > v8::internal::ErrorUtils::MakeGenericError ( Isolate * isolate,
DirectHandle< JSFunction > constructor,
MessageTemplate index,
base::Vector< const DirectHandle< Object > > args,
FrameSkipMode mode )
static

Definition at line 730 of file messages.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ NewCalledNonCallableError()

DirectHandle< JSObject > v8::internal::ErrorUtils::NewCalledNonCallableError ( Isolate * isolate,
DirectHandle< Object > source )
static

Definition at line 985 of file messages.cc.

Here is the caller graph for this function:

◆ NewConstructedNonConstructable()

DirectHandle< JSObject > v8::internal::ErrorUtils::NewConstructedNonConstructable ( Isolate * isolate,
DirectHandle< Object > source )
static

Definition at line 996 of file messages.cc.

Here is the caller graph for this function:

◆ NewIteratorError()

DirectHandle< JSObject > v8::internal::ErrorUtils::NewIteratorError ( Isolate * isolate,
DirectHandle< Object > source )
static

Definition at line 929 of file messages.cc.

Here is the caller graph for this function:

◆ SetFormattedStack()

void v8::internal::ErrorUtils::SetFormattedStack ( Isolate * isolate,
DirectHandle< JSObject > maybe_error_object,
DirectHandle< Object > formatted_stack )
static

Definition at line 1192 of file messages.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ShadowRealmConstructTypeErrorCopy()

DirectHandle< JSObject > v8::internal::ErrorUtils::ShadowRealmConstructTypeErrorCopy ( Isolate * isolate,
DirectHandle< Object > original,
MessageTemplate index,
base::Vector< const DirectHandle< Object > > args )
static

Definition at line 755 of file messages.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ThrowLoadFromNullOrUndefined()

Tagged< Object > v8::internal::ErrorUtils::ThrowLoadFromNullOrUndefined ( Isolate * isolate,
DirectHandle< Object > object,
MaybeDirectHandle< Object > key )
static

Definition at line 1006 of file messages.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ThrowSpreadArgError()

Tagged< Object > v8::internal::ErrorUtils::ThrowSpreadArgError ( Isolate * isolate,
MessageTemplate id,
DirectHandle< Object > object )
static

Definition at line 947 of file messages.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ToString()

MaybeHandle< String > v8::internal::ErrorUtils::ToString ( Isolate * isolate,
DirectHandle< Object > recv,
ToStringMessageSource message_source = ToStringMessageSource::kCurrentMessageProperty )
static

Definition at line 658 of file messages.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

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