name: duk_is_reference_error proto: | duk_bool_t duk_is_reference_error(duk_context *ctx, duk_idx_t idx); stack: | [ ... val! ... ] summary: |

Returns 1 if value at idx inherits from ReferenceError, otherwise returns 0. If idx is invalid, also returns 0. This is a convenience call for using duk_get_error_code() == DUK_ERR_REFERENCE_ERROR.

example: | if (duk_is_reference_error(ctx, -3)) { /* ... */ } tags: - stack - error introduced: 1.4.0