Fix error message spacing in uassert 16556

XMLWordPrintableJSON

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

      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

        1. Clipboard01.jpg
          14 kB
          Alex Bevilacqua

            Assignee:
            Rushan Chen
            Reporter:
            Alex Bevilacqua
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: