Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-10160

gen_error_codes.py should generate a js module with symbolic constants for the error codes in the shell.

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.1.7
    • Affects Version/s: None
    • Component/s: Shell
    • Fully Compatible

      The shell should have symbolic constants for the error codes defined in mongo/base/error_codes.py. A good way would be for gen_error_codes.py or a sister script to generate a .js file that instantiated an object at global scope, called ErrorCodes or perhaps Mongo.ErrorCodes. ErrorCodes would look like:

      { OK: 0, ... Unauthorized: 13, ... }

      We could even attach a method for stringifying numeric codes, which could be used to improve reporting in the shell.

            Assignee:
            calvin.chan Calvin Chan
            Reporter:
            schwerin@mongodb.com Andy Schwerin
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: