Skip to content

Commit de5a502

Browse files
NickNasomhdawson
authored andcommitted
doc: Napi::Error is caught
PR-URL: #1241 Reviewed-By: Michael Dawson <midawson@redhat.com
1 parent 10ad762 commit de5a502

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/error_handling.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The following sections explain the approach for each case:
2626
<a name="exceptions"></a>
2727

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

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

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

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

0 commit comments

Comments
 (0)