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

extend generate_error_codes.py to generate javascript

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Trivial - P5 Trivial - P5
    • None
    • None
    • JavaScript

    Description

      It would be nice if generate_error_codes.py also generated a javascript file that looked something like this:

      var ErrorCodes = {
          OK: 0,
          InternalError: 1,
          ...
      };
      

      The file could potentially be /jstests/libs/error_codes.js

      This would help make jstests that exercise error handling more readable.

      Attachments

        Activity

          People

            Unassigned Unassigned
            adam.midvidy Adam Midvidy
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: