Skip to content
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Update doc/api/n-api.md
Co-Authored-By: mhdawson <michael_dawson@ca.ibm.com>
  • Loading branch information
Trott and mhdawson authored Jan 7, 2019
commit 9b164244158f95abfb8e057eae9409ffa2db854f
2 changes: 1 addition & 1 deletion doc/api/n-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ called in order to allow for some minimal cleanup to be completed
before returning to JavaScript. For those functions, `napi_status`
will reflect the success/error/exception for that function, irrespective of
whether an exception was pending when the function was called.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence is difficult to understand. "for that function" is particularly confusing coming after "for those functions". Maybe try writing it as two shorter sentences or something? Or just tidying up the sentence that's there somehow?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe something like this?

In that case, `napi_status` will reflect the status for the function.
It will not reflect previous pending exceptions.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Obviously, change my suggestion if it is factually incorrect. I'm commenting on style and readability, not content.)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your suggestion works for me. Updating.

In order to avoid confusion it is important to check the
To avoid confusion, check the
error status after every function call.

When an exception is pending one of two approaches can be employed.
Expand Down