Skip to content

Commit 36185b3

Browse files
mhdawsonMylesBorins
authored andcommitted
doc: doc lifetime of n-api last error info
Document the lifetime of the structure returned by napi_get_last_error_info Backport-PR-URL: #19447 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 c3eb187 commit 36185b3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

doc/api/n-api.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,10 @@ 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 occured.
271271
272-
**Note:** Do not rely on the content or format of any of the extended
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+
275+
*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.
275278

0 commit comments

Comments
 (0)