diff options
author | Tad Marshall <tad@10gen.com> | 2013-04-14 07:50:28 -0400 |
---|---|---|
committer | Tad Marshall <tad@10gen.com> | 2013-04-14 07:50:28 -0400 |
commit | 0d46f9b7fcc8eabcf7ada9e4eb8766247e0c4f7b (patch) | |
tree | fbd03e4905f55d5add9aeac6687ff8a61f7dade5 /src/mongo/db/index_update.cpp | |
parent | 06aa0fb74f552074e718c5c4b891f82ab6f1facb (diff) | |
download | mongo-0d46f9b7fcc8eabcf7ada9e4eb8766247e0c4f7b.tar.gz |
Fix warning, use endl, catch style
Fix unreferenced variable warning, use std::endl instead of newline
in log messages, place 'catch' clause on separate line.
Diffstat (limited to 'src/mongo/db/index_update.cpp')
-rw-r--r-- | src/mongo/db/index_update.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mongo/db/index_update.cpp b/src/mongo/db/index_update.cpp index 21ec3437a84..a25b2603b8e 100644 --- a/src/mongo/db/index_update.cpp +++ b/src/mongo/db/index_update.cpp @@ -160,14 +160,16 @@ namespace mongo { try { addKeysToIndex(ns, d, i, obj, loc, !id.unique() || ignoreUniqueIndex(id)); - } catch (AssertionException& e) { + } + catch (AssertionException&) { // TODO: the new index layer indexes either all or no keys, so j <= i can be j < i. for (int j = 0; j <= i; j++) { try { _unindexRecord(d, j, obj, loc, false); - } catch(...) { + } + catch(...) { LOG(3) << "unindex fails on rollback after unique " - "key constraint prevented insert\n"; + "key constraint prevented insert" << std::endl; } } throw; @@ -592,7 +594,7 @@ namespace mongo { // delete a specific index or all? if ( *name == '*' && name[1] == 0 ) { - LOG(4) << " d->nIndexes was " << d->nIndexes << '\n'; + LOG(4) << " d->nIndexes was " << d->nIndexes << std::endl; anObjBuilder.append("nIndexesWas", (double)d->nIndexes); IndexDetails *idIndex = 0; if( d->nIndexes ) { |