Unverified Commit 44161274 authored by Ruben Bridgewater's avatar Ruben Bridgewater
Browse files

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: default avatarRichard Lau <riclau@uk.ibm.com>
Reviewed-By: default avatarBen Noordhuis <info@bnoordhuis.nl>
Reviewed-By: default avatarMichaël Zasso <targos@protonmail.com>
parent 4206e7c2
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment