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

Unify implementations of Status and DBException

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.5.12
    • Affects Version/s: None
    • Component/s: Internal Code
    • Labels:
    • Fully Compatible
    • Repl 2017-08-21
    • 0

      This is prep work for a larger improvement to our error handling code. This ticket covers:

      • Removing location() from status and the _shard member from DBException, so that they logically hold the same data
      • Make DBException hold a Status and kill off the ExceptionInfo type
      • Make log() << ErrorCodes::SomeError use the name of the error
        rather than the number
      • Make argument order consistently code then message
      • Flatten class hierarchy to eliminate MsgAssertionException and UserException into AssertionException. All other
        types will remain, as will the various assert macros which will now
        just throw AssertionException. The difference between massert vs uassert will
        now just that massert logs.

            mathias@mongodb.com Mathias Stearn
            mathias@mongodb.com Mathias Stearn
            1 Vote for this issue
            4 Start watching this issue