[SERVER-54568] Fix error message spacing in uassert 16556 Created: 14/Feb/21  Updated: 29/Oct/23  Resolved: 14/Apr/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.0.0-rc0

Type: Task Priority: Trivial - P5
Reporter: Alex Bevilacqua Assignee: Rushan Chen
Resolution: Fixed Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: JPEG File Clipboard01.jpg    
Backwards Compatibility: Fully Compatible
Sprint: Query Execution 2021-04-19
Participants:

 Description   

https://github.com/mongodb/mongo/blob/master/src/mongo/db/pipeline/expression.cpp#L4926

str::stream() << "cant $subtract a" << typeName(rhs.getType()) << " from a "
                                << typeName(lhs.getType()));

can produce an error like

Stream should begin with "can't $subtract a " to prevent typeName(rhs.getType()) from being concatenated improperly with the preceding string.

Note that uassert 16613 (https://github.com/mongodb/mongo/blob/master/src/mongo/db/pipeline/expression.cpp#L4920) has the correct spacing.

Also note, both 16553 and 16613 should fix cant to can't



 Comments   
Comment by Githook User [ 14/Apr/21 ]

Author:

{'name': 'Rushan Chen', 'email': 'rushan.chen@mongodb.com'}

Message: SERVER-54568 Fix error message spacing in subtract expression uassert
Branch: master
https://github.com/mongodb/mongo/commit/7205ba6183315d698ce8856e2e2b95f4944c4c02

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