Skip to content

Assertion failed in napi_get_last_error_info for experimental N-API #30487

@dmitryash

Description

@dmitryash
  • Version: v10.16.3
  • Platform: Linux

If NODE_EXPERIMENTAL is defined then napi_get_last_error_info() asserts due to the fact that it ignores experimental error codes (e.g. napi_bigint_expected):

../src/node_api.cc:1412:napi_status napi_get_last_error_info(napi_env, const napi_extended_error_info**):
Assertion `(env->last_error.error_code) <= (napi_callback_scope_mismatch)' failed.

Documentation does not say clearly whether nodejs should be recompiled with NODE_EXPERIMENTAL or not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues with confirmed bugs.node-apiIssues and PRs related to the Node-API.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions