v8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
v8::MaybeLocal< T > Class Template Reference

#include <v8.h>

Public Member Functions

V8_INLINE MaybeLocal ()
 
template<class S >
V8_INLINE MaybeLocal (Local< S > that)
 
V8_INLINE bool IsEmpty () const
 
template<class S >
V8_WARN_UNUSED_RESULT
V8_INLINE bool 
ToLocal (Local< S > *out) const
 
V8_INLINE Local< T > ToLocalChecked ()
 
template<class S >
V8_INLINE Local< S > FromMaybe (Local< S > default_value) const
 

Detailed Description

template<class T>
class v8::MaybeLocal< T >

A MaybeLocal<> is a wrapper around Local<> that enforces a check whether the Local<> is empty before it can be used.

If an API method returns a MaybeLocal<>, the API method can potentially fail either because an exception is thrown, or because an exception is pending, e.g. because a previous API call threw an exception that hasn't been caught yet, or because a TerminateExecution exception was thrown. In that case, an empty MaybeLocal is returned.

Constructor & Destructor Documentation

template<class T>
V8_INLINE v8::MaybeLocal< T >::MaybeLocal ( )
inline
template<class T>
template<class S >
V8_INLINE v8::MaybeLocal< T >::MaybeLocal ( Local< S >  that)
inline

Member Function Documentation

template<class T>
template<class S >
V8_INLINE Local<S> v8::MaybeLocal< T >::FromMaybe ( Local< S >  default_value) const
inline
template<class T>
V8_INLINE bool v8::MaybeLocal< T >::IsEmpty ( ) const
inline
template<class T>
template<class S >
V8_WARN_UNUSED_RESULT V8_INLINE bool v8::MaybeLocal< T >::ToLocal ( Local< S > *  out) const
inline
template<class T >
Local< T > v8::MaybeLocal< T >::ToLocalChecked ( )

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