diff options
author | Ruben Bridgewater <ruben@bridgewater.de> | 2019-04-14 21:34:26 +0200 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2019-05-01 12:29:04 +0200 |
commit | 44161274821a2e81e7a5706c06cf8aa8bd2aa972 (patch) | |
tree | f1814f01f9e4da33f336ce76ca45bd79b28b04da /test/parallel/test-file-write-stream3.js | |
parent | 4206e7c2c4d8571029bf3c6e194f979f24910498 (diff) | |
download | android-node-v8-44161274821a2e81e7a5706c06cf8aa8bd2aa972.tar.gz android-node-v8-44161274821a2e81e7a5706c06cf8aa8bd2aa972.tar.bz2 android-node-v8-44161274821a2e81e7a5706c06cf8aa8bd2aa972.zip |
buffer,errors: improve bigint, big numbers and more
This improves the error message from `ERR_OUT_OF_RANGE` by closer
inspecting the value and logging numbers above 2 ** 32 by adding
commas to the output for integer and bigint. BigInt is now also
marked if used.
Buffer errors also format the range as 2 ** n instead of showing a
huge number.
PR-URL: https://github.com/nodejs/node/pull/27228
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Diffstat (limited to 'test/parallel/test-file-write-stream3.js')
-rw-r--r-- | test/parallel/test-file-write-stream3.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/parallel/test-file-write-stream3.js b/test/parallel/test-file-write-stream3.js index 618fbdf884..45c431b5d5 100644 --- a/test/parallel/test-file-write-stream3.js +++ b/test/parallel/test-file-write-stream3.js @@ -199,8 +199,8 @@ const run_test_5 = common.mustCall(function() { }; const err = { code: 'ERR_OUT_OF_RANGE', - message: 'The value of "start" is out of range. ' + - 'It must be >= 0 and <= 2 ** 53 - 1. Received 9007199254740992', + message: 'The value of "start" is out of range. It must be ' + + '>= 0 and <= 2 ** 53 - 1. Received 9_007_199_254_740_992', type: RangeError }; common.expectsError(fn, err); |