0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

errorcodes

This commit is contained in:
gregs 2011-06-21 22:09:04 -04:00
parent e40135e5ce
commit 99c28cb998
2 changed files with 3 additions and 3 deletions

View File

@ -1208,7 +1208,7 @@ namespace mongo {
appendMinForType( fieldName , MaxKey ); return;
}
log() << "type not supported for appendMaxElementForType: " << t << endl;
uassert( 14846 , "type not supported for appendMaxElementForType" , false );
uassert( 14853 , "type not supported for appendMaxElementForType" , false );
}
const string BSONObjBuilder::numStrs[] = {

View File

@ -352,13 +352,13 @@ namespace mongo {
bool multi = flags & UpdateOption_Multi;
if (upsert) {
uassert(14844, "can't upsert something without shard key",
uassert(14851, "can't upsert something without shard key",
(manager->hasShardKey(toupdate) ||
(toupdate.firstElementFieldName()[0] == '$' && manager->hasShardKey(query))));
BSONObj key = manager->getShardKey().extractKey(query);
BSONForEach(e, key) {
uassert(14845, "shard key in upsert query must be an exact match", getGtLtOp(e) == BSONObj::Equality);
uassert(14852, "shard key in upsert query must be an exact match", getGtLtOp(e) == BSONObj::Equality);
}
}