[SERVER-34364] add Status support to invariant() Created: 06/Apr/18 Updated: 29/Oct/23 Resolved: 26/Apr/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | 4.0.0-rc0 |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Benety Goh | Assignee: | Benety Goh |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Sprint: | Repl 2018-04-23, Repl 2018-05-07 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
Code that require the use of invariants currently use invariant() for boolean conditions and invariantOK() for Statuses. Extending invariant() to support Status would mean one fewer assertion function for developers to remember. |
| Comments |
| Comment by Githook User [ 26/Apr/18 ] |
|
Author: {'email': 'benety@mongodb.com', 'username': 'benety', 'name': 'Benety Goh'}Message: |
| Comment by Githook User [ 26/Apr/18 ] |
|
Author: {'email': 'benety@mongodb.com', 'username': 'benety', 'name': 'Benety Goh'}Message: |
| Comment by Githook User [ 26/Apr/18 ] |
|
Author: {'email': 'benety@mongodb.com', 'username': 'benety', 'name': 'Benety Goh'}Message: |
| Comment by Githook User [ 23/Apr/18 ] |
|
Author: {'email': 'benety@mongodb.com', 'username': 'benety', 'name': 'Benety Goh'}Message: |
| Comment by Githook User [ 23/Apr/18 ] |
|
Author: {'email': 'benety@mongodb.com', 'username': 'benety', 'name': 'Benety Goh'}Message: |
| Comment by Benety Goh [ 06/Apr/18 ] |
|
The various fassert() variants were unified recently in |