[SERVER-42624] reformat error_codes.err as error_codes.yml Created: 04/Aug/19  Updated: 29/Oct/23  Resolved: 13/Aug/19

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 4.3.1

Type: Improvement Priority: Major - P3
Reporter: Billy Donahue Assignee: Billy Donahue
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Dev Tools 2019-09-09, Dev Tools 2019-09-09
Participants:

 Description   

This file is very messy and should get a once-over.

`error_code` is a function call, with inconsistent formatting.
It's easier to review data tables than a sequence of function calls.

Place the error code integer first, so table lines up better, and the contiguous integer sequence is emphasized. Doing so makes it clear that the array is mostly sorted with some errors. So sort it as well.

Reformat the error_class definitions as a big json object, with one code per line for maximum diff friendliness. Existing formatting is inconsistently bin packed.

Also:

Remove semicolons from error_codes calls.

Remove trailing space from integer codes.

Consistently use single-quotes.

Sort the ErrorCode definitions.



 Comments   
Comment by Githook User [ 13/Aug/19 ]

Author:

{'name': 'Billy Donahue', 'email': 'billy.donahue@mongodb.com', 'username': 'BillyDonahue'}

Message: SERVER-42624 convert to error_codes.yml

Sort error codes numerically.
Move declaration of category membership into the members.
Simplify generate_error_codes.py w/argparse, etc.
Branch: master
https://github.com/mongodb/mongo/commit/bfb1a2ebcc2c8b1918f9932dd059e5d0cd0eac48

Comment by Billy Donahue [ 04/Aug/19 ]

https://mongodbcr.appspot.com/492430001/

Generated at Thu Feb 08 05:00:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.