|
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;
|
}
|
|