Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: assign error codes to more errors thrown in C++ #20121

Closed
wants to merge 10 commits into from

Commits on Apr 18, 2018

  1. Configuration menu
    Copy the full SHA
    034ddaf View commit details
    Browse the repository at this point in the history
  2. src: migrate ERR_INDEX_OUT_OF_RANGE in C++

    This patch migrates the "Index out of range" errors in C++
    to errors with the code `ERR_INDEX_OUT_OF_RANGE` which have
    equivalents in JavaScript.
    joyeecheung committed Apr 18, 2018
    Configuration menu
    Copy the full SHA
    495ba98 View commit details
    Browse the repository at this point in the history
  3. src: throw ERR_INVALID_ARG_TYPE in C++ argument checks

    - Moves THROW_AND_RETURN_IF_NOT_BUFFER and
      THROW_AND_RETURN_IF_NOT_STRING from node_crypto.cc to
      node_errors.h so it can be reused.
    - Move THROW_AND_RETURN_UNLESS_BUFFER in util.h to
      node_buffer.cc and call THROW_AND_RETURN_IF_NOT_BUFFER
      there. The only other reference to THROW_AND_RETURN_UNLESS_BUFFER in
      node_i18n.cc can be safely replaced by an assertion since
      the argument will be checked in JS land.
    - Migrate ERR_INVALID_ARG_TYPE errors in C++. We can move the
      checks to JS land if possible later without having to
      go semver-major.
    joyeecheung committed Apr 18, 2018
    Configuration menu
    Copy the full SHA
    0a9f327 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    185c60d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b2e7ff3 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    46935ab View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    0b4364e View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    184e8ea View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    834764e View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    60a0c36 View commit details
    Browse the repository at this point in the history