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

errors: move error creation helpers to internal/errors.js #18546

Closed
wants to merge 3 commits into from

Commits on Feb 3, 2018

  1. Configuration menu
    Copy the full SHA
    d3671ae View commit details
    Browse the repository at this point in the history
  2. fs: do not call new when creating uvException

    We cannot make uvException a proper class due to compatibility
    reasons for now, so there is no need to call new since
    it only returns a newly-created Error.
    joyeecheung committed Feb 3, 2018
    Configuration menu
    Copy the full SHA
    7cb2e97 View commit details
    Browse the repository at this point in the history
  3. errors: move error creation helpers to errors.js

    This commit moves error creation helpers scattered around
    under lib/ into lib/internal/errors.js in the hope of being clearer
    about the differences of errors that we throw into the user land.
    
    - Move util._errnoException and util._exceptionWithHostPort
      into internal/errors.js and simplify their logic so it's
      clearer what the properties these helpers create.
    - Move the errnoException helper in dns.js to internal/errors.js
      into internal/errors.js and rename it to dnsException. Simplify
      it's logic so it no longer calls errnoException and skips
      the unnecessary argument checks.
    joyeecheung committed Feb 3, 2018
    Configuration menu
    Copy the full SHA
    895a2d6 View commit details
    Browse the repository at this point in the history