errors: use ERR_OUT_OF_RANGE for index errors
Remove ERR_INDEX_OUT_OF_RANGE in favor of ERR_OUT_OF_RANGE which is capable of providing more detail. (In one instance, use ERR_BUFFER_OUT_OF_BOUNDS which is more accurate in that one instance.)
Updated variable names to match documentation and error messages.
Updated some test cases to only check the error code and type and not the error message which should be subject to change.
h/t @apapirovski for help with troubleshooting C++ compilation errors because...yeah, that's not my strong suit
Labeling semver-major
because error code changes are breaking changes. @nodejs/tsc
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines