v8toolkit  0.0.1
Utility library for embedding V8 Javascript engine in a c++ program
Public Member Functions | List of all members
v8toolkit::V8Exception Class Reference

#include <v8toolkit.h>

Inheritance diagram for v8toolkit::V8Exception:
Inheritance graph
[legend]
Collaboration diagram for v8toolkit::V8Exception:
Collaboration graph
[legend]

Public Member Functions

 V8Exception (v8::Isolate *isolate, v8::Global< v8::Value > &&value)
 
 V8Exception (v8::Isolate *isolate, v8::Local< v8::Value > value)
 
 V8Exception (v8::Isolate *isolate, std::string reason)
 
virtual const char * what () const noexcept override
 
v8::Local< v8::Value > get_local_value ()
 
v8::Isolate * get_isolate ()
 
v8::Global< v8::Value > get_value ()
 

Detailed Description

When the V8 engine itself generates an error (or a user calls isolate->ThrowException manually with a v8::Value for some reason) That exception is re-thrown as a standard C++ exception of this type. The V8 Value thrown is available. get_local_value must be called within a HandleScope get_value returns a new Global handle to the value.

Definition at line 245 of file v8toolkit.h.

Constructor & Destructor Documentation

v8toolkit::V8Exception::V8Exception ( v8::Isolate *  isolate,
v8::Global< v8::Value > &&  value 
)
inline

Definition at line 252 of file v8toolkit.h.

v8toolkit::V8Exception::V8Exception ( v8::Isolate *  isolate,
v8::Local< v8::Value >  value 
)
inline

Definition at line 256 of file v8toolkit.h.

v8toolkit::V8Exception::V8Exception ( v8::Isolate *  isolate,
std::string  reason 
)
inline

Definition at line 257 of file v8toolkit.h.

Member Function Documentation

virtual const char* v8toolkit::V8Exception::what ( ) const
inlineoverridevirtualnoexcept

Definition at line 258 of file v8toolkit.h.

v8::Local<v8::Value> v8toolkit::V8Exception::get_local_value ( )
inline

Definition at line 261 of file v8toolkit.h.

v8::Isolate* v8toolkit::V8Exception::get_isolate ( )
inline

Definition at line 262 of file v8toolkit.h.

v8::Global<v8::Value> v8toolkit::V8Exception::get_value ( )
inline

Definition at line 263 of file v8toolkit.h.


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