From 4c43ff271f66336e7c25a42c26e5e31fc777a37a Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Mon, 26 Jun 2017 18:41:25 -0400 Subject: [PATCH] doc: doc lifetime of n-api last error info Document the lifetime of the structure returned by napi_get_last_error_info PR-URL: https://github.com/nodejs/node/pull/13939 Fixes: https://github.com/nodejs/abi-stable-node/issues/251 Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: Vse Mozhet Byt Reviewed-By: Hitesh Kanwathirtha --- doc/api/n-api.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/api/n-api.md b/doc/api/n-api.md index f6e225488c13d1..da26b88710d1c9 100644 --- a/doc/api/n-api.md +++ b/doc/api/n-api.md @@ -269,6 +269,9 @@ Returns `napi_ok` if the API succeeded. This API retrieves a `napi_extended_error_info` structure with information about the last error that occurred. +*Note*: The content of the `napi_extended_error_info` returned is only +valid up until an n-api function is called on the same `env`. + *Note*: Do not rely on the content or format of any of the extended information as it is not subject to SemVer and may change at any time. It is intended only for logging purposes.