Skip to content

N-API: add error code to error creation methods #13933

Closed
@mhdawson

Description

@mhdawson
  • Version: ALL
  • Platform: ALL
  • Subsystem: ALL

As part of the push on #11273 we should encourage the good practice of providing a code separate from the message on errors created by N-API modules. Since the modules don't have access to the internal list of errors they will not necessarily use the same error codes/templates, but it will still encourage good practice and could be useful if N-API is later used to implement internal modules.

This would likely be by adding an optional code value to existing APIs like napi_create_error.

Metadata

Metadata

Assignees

Labels

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