Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
errors: add more information in case of invalid callbacks
This adds the actual callback that is passed through to the error message in case an ERR_INVALID_CALLBACK error is thrown. PR-URL: #27048 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
- Loading branch information
Showing
with
90 additions
and 73 deletions.
- +1 −1 lib/_tls_wrap.js
- +3 −3 lib/dns.js
- +4 −4 lib/fs.js
- +1 −1 lib/inspector.js
- +1 −1 lib/internal/crypto/keygen.js
- +1 −1 lib/internal/crypto/pbkdf2.js
- +2 −2 lib/internal/crypto/random.js
- +1 −1 lib/internal/crypto/scrypt.js
- +2 −1 lib/internal/errors.js
- +1 −1 lib/internal/http2/compat.js
- +6 −6 lib/internal/http2/core.js
- +1 −1 lib/internal/process/task_queues.js
- +2 −2 lib/internal/stream_base_commons.js
- +1 −1 lib/internal/streams/pipeline.js
- +1 −1 lib/internal/timers.js
- +1 −1 lib/internal/url.js
- +1 −1 lib/perf_hooks.js
- +3 −3 lib/timers.js
- +3 −2 test/parallel/test-crypto-random.js
- +1 −1 test/parallel/test-fs-read.js
- +2 −1 test/parallel/test-http2-client-rststream-before-connect.js
- +3 −1 test/parallel/test-http2-client-settings-before-connect.js
- +1 −1 test/parallel/test-http2-compat-serverresponse-createpushresponse.js
- +3 −1 test/parallel/test-http2-ping.js
- +1 −1 test/parallel/test-http2-server-push-stream-errors-args.js
- +10 −10 test/parallel/test-http2-server-settimeout-no-callback.js
- +2 −2 test/parallel/test-http2-timeouts.js
- +3 −1 test/parallel/test-net-socket-timeout.js
- +9 −6 test/parallel/test-performanceobserver.js
- +9 −6 test/parallel/test-process-next-tick.js
- +8 −7 test/parallel/test-timers-refresh.js
- +2 −1 test/sequential/test-inspector-module.js
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @@ -24,7 +24,7 @@ const server = h2.createServer((request, response) => { | ||
| { | ||
| code: 'ERR_INVALID_CALLBACK', | ||
| type: TypeError, | ||
| message: 'Callback must be a function. Received undefined' | ||
| } | ||
| ); | ||
|
|
||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @@ -22,7 +22,7 @@ server.on('stream', common.mustCall((stream, headers) => { | ||
| }, {}, 'callback'), | ||
| { | ||
| code: 'ERR_INVALID_CALLBACK', | ||
| message: "Callback must be a function. Received 'callback'" | ||
| } | ||
| ); | ||
|
|
||
Oops, something went wrong.