Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions doc/error_handling.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The following sections explain the approach for each case:
<a name="exceptions"></a>

In most cases when an error occurs, the addon should do whatever cleanup is possible
and then return to JavaScript so that the error can be propagated. In less frequent
and then return to JavaScript so that the error can be propagated. In less frequent
cases the addon may be able to recover from the error, clear the error and then
continue.

Expand All @@ -48,8 +48,8 @@ method.
If a C++ exception of type `Napi::Error` escapes from a Node-API C++ callback, then
the Node-API wrapper automatically converts and throws it as a JavaScript exception.

On return from a native method, node-addon-api will automatically convert a pending C++
exception to a JavaScript exception.
On return from a native method, node-addon-api will automatically convert a pending
`Napi::Error` C++ exception to a JavaScript exception.

When C++ exceptions are enabled try/catch can be used to catch exceptions thrown
from calls to JavaScript and then they can either be handled or rethrown before
Expand Down