Skip to content

Commit 4c43ff2

Browse files
mhdawsonaddaleax
authored andcommitted
doc: doc lifetime of n-api last error info
Document the lifetime of the structure returned by napi_get_last_error_info PR-URL: #13939 Fixes: nodejs/abi-stable-node#251 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Hitesh Kanwathirtha <[email protected]>
1 parent 7332e7e commit 4c43ff2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

doc/api/n-api.md

+3
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,9 @@ Returns `napi_ok` if the API succeeded.
269269
This API retrieves a `napi_extended_error_info` structure with information
270270
about the last error that occurred.
271271
272+
*Note*: The content of the `napi_extended_error_info` returned is only
273+
valid up until an n-api function is called on the same `env`.
274+
272275
*Note*: Do not rely on the content or format of any of the extended
273276
information as it is not subject to SemVer and may change at any time.
274277
It is intended only for logging purposes.

0 commit comments

Comments
 (0)