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 targos committed Jan 14, 2020
1 parent 88085f0 commit 5a8a7a4
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 5a8a7a4

Please sign in to comment.