summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2014-06-09 10:03:45 -0400
committerDan Pasette <dan@mongodb.com>2014-09-15 11:55:47 -0700
commitc785f1a4cc02c5ba157b7482b3df82fced65104d (patch)
tree0dce57a0d27338f90540abf53c2419c7af4ec40e
parent930050ad3229d242a16467cd4812de3c44766726 (diff)
downloadmongo-c785f1a4cc02c5ba157b7482b3df82fced65104d.tar.gz
SERVER-14205: fix error reporting in IndexCatalog::createIndex
(cherry picked from commit 8fc8bc9a86711bb9ea41887d2f88362353dc3062)
-rw-r--r--src/mongo/db/catalog/index_catalog.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/mongo/db/catalog/index_catalog.cpp b/src/mongo/db/catalog/index_catalog.cpp
index 990cb2158c7..ead9dd9311e 100644
--- a/src/mongo/db/catalog/index_catalog.cpp
+++ b/src/mongo/db/catalog/index_catalog.cpp
@@ -371,10 +371,7 @@ namespace mongo {
_inProgressIndexes.erase(it);
}
- ErrorCodes::Error codeToUse = ErrorCodes::fromInt( exc.getCode() );
- if ( codeToUse == ErrorCodes::UnknownError )
- return Status( ErrorCodes::InternalError, exc.what(), exc.getCode() );
- return Status( codeToUse, exc.what() );
+ return exc.toStatus();
}
}