audit and clean up shared error code definitions and references

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Diagnostics
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      There are some different places where we use an enum or variable to represent error codes:

          enum CommonErrorCodes {
              DatabaseDifferCaseCode = 13297 ,
              SendStaleConfigCode = 13388 ,
              RecvStaleConfigCode = 9996
          };
      
          enum { ASSERT_ID_DUPKEY = 11000 };
      
          static const int OutOfOrderDocumentsAssertionCode = 14810;
      

      There are probably some others as well. It might be nice to standardize these.

      Also, there are some places where we refer to error codes by numeric value and might not want to be doing this. Just grepping for getCode() shows some of these. A couple examples:

                          if( e.getCode() != 15850 )
                              throw;
      
                  if( e.getCode() == 10287 && idxNo == d->nIndexes ) {
                      DEV log() << "info: caught key already in index on bg indexing (ok)" << endl;
                  }
      

            Assignee:
            Unassigned
            Reporter:
            Aaron Staple (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: