Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: add clarification for exception behaviour #25339

Closed
wants to merge 6 commits into from

Conversation

@mhdawson
Copy link
Member

commented Jan 4, 2019

Refs: nodejs/abi-stable-node#356

Document current behaviour where some methods can be called
when an exception is pending, while others cannot and explain
the behaviour.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • documentation is changed or added
  • commit message follows commit guidelines
doc: add clarification for exception behaviour
Refs: nodejs/abi-stable-node#356

Document current behaviour where some methods can be called
when an exception is pending, while others cannot and explain
the behaviour.
@cjihrig
cjihrig approved these changes Jan 4, 2019
doc/api/n-api.md Outdated Show resolved Hide resolved
doc/api/n-api.md Outdated Show resolved Hide resolved
doc/api/n-api.md Outdated Show resolved Hide resolved
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.

This comment has been minimized.

Copy link
@Trott

Trott Jan 4, 2019

Member

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?

This comment has been minimized.

Copy link
@Trott

Trott Jan 4, 2019

Member

Maybe something like this?

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

This comment has been minimized.

Copy link
@Trott

Trott Jan 4, 2019

Member

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

This comment has been minimized.

Copy link
@mhdawson

mhdawson Jan 7, 2019

Author Member

Your suggestion works for me. Updating.

@addaleax
Copy link
Member

left a comment

LGTM with @Trott’s suggestions

@lpinca
lpinca approved these changes Jan 4, 2019
Trott and others added 5 commits Jan 7, 2019
Update doc/api/n-api.md
Co-Authored-By: mhdawson <michael_dawson@ca.ibm.com>
squash: accept suggestion
Co-Authored-By: mhdawson <michael_dawson@ca.ibm.com>
squash: accept suggestion
Co-Authored-By: mhdawson <michael_dawson@ca.ibm.com>
@mhdawson

This comment has been minimized.

Copy link
Member Author

commented Jan 7, 2019

@Trott fixed up as per your comments.

@mhdawson

This comment has been minimized.

Copy link
Member Author

commented Jan 8, 2019

@danbev

This comment has been minimized.

Copy link
Member

commented Jan 9, 2019

Landed in b406c9c.

@danbev danbev closed this Jan 9, 2019

danbev added a commit that referenced this pull request Jan 9, 2019
doc: add clarification for exception behaviour
Document current behaviour where some methods can be called
when an exception is pending, while others cannot and explain
the behaviour.

PR-URL: #25339
Refs: nodejs/abi-stable-node#356
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
addaleax added a commit that referenced this pull request Jan 14, 2019
doc: add clarification for exception behaviour
Document current behaviour where some methods can be called
when an exception is pending, while others cannot and explain
the behaviour.

PR-URL: #25339
Refs: nodejs/abi-stable-node#356
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@BridgeAR BridgeAR referenced this pull request Jan 16, 2019
BridgeAR added a commit to BridgeAR/node that referenced this pull request Jan 16, 2019
doc: add clarification for exception behaviour
Document current behaviour where some methods can be called
when an exception is pending, while others cannot and explain
the behaviour.

PR-URL: nodejs#25339
Refs: nodejs/abi-stable-node#356
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@MylesBorins MylesBorins referenced this pull request Jan 24, 2019
BethGriggs added a commit that referenced this pull request Apr 28, 2019
doc: add clarification for exception behaviour
Document current behaviour where some methods can be called
when an exception is pending, while others cannot and explain
the behaviour.

PR-URL: #25339
Refs: nodejs/abi-stable-node#356
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@BethGriggs BethGriggs referenced this pull request May 1, 2019
BethGriggs added a commit that referenced this pull request May 10, 2019
doc: add clarification for exception behaviour
Document current behaviour where some methods can be called
when an exception is pending, while others cannot and explain
the behaviour.

PR-URL: #25339
Refs: nodejs/abi-stable-node#356
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
MylesBorins added a commit that referenced this pull request May 16, 2019
doc: add clarification for exception behaviour
Document current behaviour where some methods can be called
when an exception is pending, while others cannot and explain
the behaviour.

PR-URL: #25339
Refs: nodejs/abi-stable-node#356
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.