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

Make UpdateDriver::parse() throw an exception instead of returning error Status

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.1.1
    • Affects Version/s: None
    • Component/s: None
    • Fully Compatible
    • Query 2018-06-18, Query 2018-07-02, Query 2018-07-16

      Currently, UpdateDriver::parse() has a Status return type and can return an error Status, but it can also propagate exceptions from UpdateDriver::parseUpdateExpression(). Because we are moving towards exception throwing for indicating errors, we should modify UpdateDriver::parse() so that it returns void and uasserts at places where it currently returns an error.

      As far as we know, UpdateDriver::parse() call sites behave correctly in cases where exceptions are thrown, but we should probably audit them anyway when making this change.

            Assignee:
            minji.kim Minji Kim
            Reporter:
            justin.seyster@mongodb.com Justin Seyster
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: