Skip to content

Commit

Permalink
process: fix incorrect usage of assert.fail()
Browse files Browse the repository at this point in the history
The message argument for `assert.fail()` is the third argument, not the
first. Correct minor misuse in internal module.

PR-URL: nodejs#6211
Reviewed-By: Brian White <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Evan Lucas <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
  • Loading branch information
Trott authored and jasnell committed Apr 18, 2016
1 parent eafd31a commit b7f4b1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/process/promises.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function setupPromises(scheduleMicrotasks) {
else if (event === promiseRejectEvent.handled)
rejectionHandled(promise);
else
require('assert').fail('unexpected PromiseRejectEvent');
require('assert').fail(null, null, 'unexpected PromiseRejectEvent');
});

function unhandledRejection(promise, reason) {
Expand Down

0 comments on commit b7f4b1b

Please sign in to comment.