[SERVER-31629] Support creating a Status with a unique numeric code Created: 18/Oct/17  Updated: 30/Oct/23  Resolved: 02/Nov/17

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 3.6.0-rc3

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

Backwards Compatibility: Fully Compatible
Sprint: Repl 2017-10-23, Repl 2017-11-13
Participants:

 Description   

We currently ban creating a unique numeric code in a Status (rather than a uassert) because our unique code checker won't see them which will cause duplicate codes. This ticket is about making that work so we don't need to keep using ErrorCodes::BadValue everywhere.



 Comments   
Comment by Githook User [ 02/Nov/17 ]

Author:

{'name': 'Mathias Stearn', 'username': 'RedBeard0531', 'email': 'mathias@10gen.com'}

Message: SERVER-31629 Support putting unique codes directly into Status constructors
Branch: master
https://github.com/mongodb/mongo/commit/cd26a1d5ee080f1a68b874046e5e5b3672267f69

Comment by Githook User [ 02/Nov/17 ]

Author:

{'name': 'Mathias Stearn', 'username': 'RedBeard0531', 'email': 'mathias@10gen.com'}

Message: SERVER-31629 Replace ErrorCodes::fromInt() with ErrorCodes::Error()

No reason to have two ways to express the same thing, and we can't get rid of
ErrorCodes::Error().
Branch: master
https://github.com/mongodb/mongo/commit/a963b8641cf2ab2cd0ccbbde04993a8224dcf52a

Generated at Thu Feb 08 04:27:41 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.