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

Fix error message spacing in uassert 16556

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Trivial - P5 Trivial - P5
    • 5.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Fully Compatible
    • Query Execution 2021-04-19

      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

            Assignee:
            rushan.chen@mongodb.com Rushan Chen
            Reporter:
            alex.bevilacqua@mongodb.com Alex Bevilacqua
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: