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

Add example of null to assert.ifError #18236

Closed
wants to merge 1 commit into from

Conversation

Projects
None yet
8 participants
@Leko
Copy link
Member

commented Jan 18, 2018

This is useful when testing the error argument in callbacks.

Assert | Node.js v9.4.0 Documentation

error argument would be null or Error.
I think need to add example case of null to help understanding assert.ifError.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

doc

@targos

targos approved these changes Jan 20, 2018

@targos

This comment has been minimized.

Copy link
Member

commented Jan 20, 2018

@targos

This comment has been minimized.

Copy link
Member

commented Jan 20, 2018

Commit message nit: start with a lowercase after the subsystem.

@BridgeAR

This comment has been minimized.

Copy link
Member

commented Jan 21, 2018

Landed in 08ada72

@BridgeAR BridgeAR closed this Jan 21, 2018

BridgeAR added a commit to BridgeAR/node that referenced this pull request Jan 21, 2018

doc: Add example of null to assert.ifError
PR-URL: nodejs#18236
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>

@Leko Leko deleted the Leko:add-example-assert_ifError branch Jan 22, 2018

maclover7 added a commit that referenced this pull request Jan 26, 2018

doc: Add example of null to assert.ifError
PR-URL: #18236
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>

evanlucas added a commit that referenced this pull request Jan 30, 2018

doc: Add example of null to assert.ifError
PR-URL: #18236
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>

evanlucas added a commit that referenced this pull request Jan 30, 2018

doc: Add example of null to assert.ifError
PR-URL: #18236
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>

msoechting added a commit to hpicgs/node that referenced this pull request Feb 5, 2018

doc: Add example of null to assert.ifError
PR-URL: nodejs#18236
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>

msoechting added a commit to hpicgs/node that referenced this pull request Feb 7, 2018

doc: Add example of null to assert.ifError
PR-URL: nodejs#18236
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>

MylesBorins added a commit that referenced this pull request Feb 27, 2018

doc: Add example of null to assert.ifError
PR-URL: #18236
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>

MylesBorins added a commit that referenced this pull request Feb 27, 2018

doc: Add example of null to assert.ifError
PR-URL: #18236
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>

This was referenced Feb 27, 2018

MayaLekova added a commit to MayaLekova/node that referenced this pull request May 8, 2018

doc: Add example of null to assert.ifError
PR-URL: nodejs#18236
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.