module Duktape::API::Call

Overview

NOTE These methods are all equivalent to the Duktape pcall_xxx functions because we wish to safely return from errors.

Direct including types

Defined in:

duktape/api/call.cr

Constant Summary

ERRORS = {error: LibDUK::Ret::Error, eval: LibDUK::Ret::EvalError, range: LibDUK::Ret::RangeError, reference: LibDUK::Ret::ReferenceError, syntax: LibDUK::Ret::SyntaxError, type: LibDUK::Ret::TypeError, uri: LibDUK::Ret::UriError}

Instance Method Summary

Instance Method Detail

def call(nargs : Int32) #

[View source]
def call_failure(error = :error) #

[View source]
def call_method(nargs : Int32) #

[View source]
def call_prop(index : LibDUK::Index, nargs : Int32) #

[View source]
def call_success #

[View source]
def new(nargs : Int32) #

Equivalent to duk_pnew (protected call)


[View source]
def return(ret_val : Int32) #

[View source]
def return_undefined #

[View source]
def safe_call(nargs : Int32 = 0, nrets : Int32 = 0, &block : LibDUK::Context -> Int32) #

Experimental


[View source]