summaryrefslogtreecommitdiff
path: root/src/mongo
diff options
context:
space:
mode:
authorU-tellus\cwestin <cwestin@10gen.com>2012-02-24 10:42:34 -0800
committerU-tellus\cwestin <cwestin@10gen.com>2012-02-29 20:33:52 -0800
commit00498dc20f070394d9d42e1d40e6dadd0ff54e0a (patch)
tree22a12bf5a16f5fc69bd80358a58c79c7d7e87555 /src/mongo
parentd5bcc464a0479a2a07ab5299dc2b34c760857ea5 (diff)
downloadmongo-00498dc20f070394d9d42e1d40e6dadd0ff54e0a.tar.gz
SERVER-4843
Diffstat (limited to 'src/mongo')
-rwxr-xr-xsrc/mongo/db/pipeline/accumulator.cpp2
-rw-r--r--src/mongo/db/pipeline/document_source_skip.cpp11
2 files changed, 7 insertions, 6 deletions
diff --git a/src/mongo/db/pipeline/accumulator.cpp b/src/mongo/db/pipeline/accumulator.cpp
index 42dc5c1334a..64c983c5e2d 100755
--- a/src/mongo/db/pipeline/accumulator.cpp
+++ b/src/mongo/db/pipeline/accumulator.cpp
@@ -56,8 +56,6 @@ namespace mongo {
}
void agg_framework_reservedErrors() {
- uassert(15956, "reserved error", false);
-
uassert(16028, "reserved error", false);
uassert(16029, "reserved error", false);
uassert(16030, "reserved error", false);
diff --git a/src/mongo/db/pipeline/document_source_skip.cpp b/src/mongo/db/pipeline/document_source_skip.cpp
index 605f85e7f92..6831795cf21 100644
--- a/src/mongo/db/pipeline/document_source_skip.cpp
+++ b/src/mongo/db/pipeline/document_source_skip.cpp
@@ -107,14 +107,17 @@ namespace mongo {
intrusive_ptr<DocumentSource> DocumentSourceSkip::createFromBson(
BSONElement *pBsonElement,
const intrusive_ptr<ExpressionContext> &pExpCtx) {
- uassert(15972, str::stream() << "the value to " <<
- skipName << " must be a number", pBsonElement->isNumber());
+ uassert(15972, str::stream() << DocumentSourceSkip::skipName <<
+ ": the value to skip must be a number",
+ pBsonElement->isNumber());
intrusive_ptr<DocumentSourceSkip> pSkip(
DocumentSourceSkip::create(pExpCtx));
- pSkip->skip = (int)pBsonElement->numberLong();
- assert(pSkip->skip > 0); // CW TODO error code
+ pSkip->skip = pBsonElement->numberLong();
+ uassert(15956, str::stream() << DocumentSourceSkip::skipName <<
+ ": the number to skip cannot be negative",
+ pSkip->skip >= 0);
return pSkip;
}