Skip to content

Commit

Permalink
doc: fix description of N-API exception handlers
Browse files Browse the repository at this point in the history
The return value is not a boolean and even if interpreted as one,
it does not indicate whether an exception is pending.

For napi_is_exception_pending, the description of the result parameter
already explains how to check whether an exception is pending.

PR-URL: #30893
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Gabriel Schulhof <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
  • Loading branch information
tniessen authored and MylesBorins committed Dec 17, 2019
1 parent cbe29ce commit df5ae1a
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions doc/api/n-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1057,8 +1057,6 @@ napi_status napi_get_and_clear_last_exception(napi_env env,

Returns `napi_ok` if the API succeeded.

This API returns true if an exception is pending.

This API can be called even if there is a pending JavaScript exception.

#### napi_is_exception_pending
Expand All @@ -1076,8 +1074,6 @@ napi_status napi_is_exception_pending(napi_env env, bool* result);

Returns `napi_ok` if the API succeeded.

This API returns true if an exception is pending.

This API can be called even if there is a pending JavaScript exception.

#### napi_fatal_exception
Expand Down

0 comments on commit df5ae1a

Please sign in to comment.