summaryrefslogtreecommitdiff
path: root/src/mongo/db/matcher/doc_validation_error.h
diff options
context:
space:
mode:
authorMihai Andrei <mihai.andrei@10gen.com>2020-07-02 19:20:55 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-07-02 23:49:49 +0000
commit639c8e665ed9eb55cea88c700885d8b01727e6d5 (patch)
tree94af30fa920be31cd8ce7b06189e312460b2a023 /src/mongo/db/matcher/doc_validation_error.h
parentbca920ba961a95e58fa2f40d80844817ad1489d8 (diff)
downloadmongo-639c8e665ed9eb55cea88c700885d8b01727e6d5.tar.gz
Revert "SERVER-48781 Introduce 'DocumentValidationErrorExtraInfo' and shell support for document validation errors"
This reverts commit 0ab6e8fb4d26b7bbe22d483dbe7850e64013447c.
Diffstat (limited to 'src/mongo/db/matcher/doc_validation_error.h')
-rw-r--r--src/mongo/db/matcher/doc_validation_error.h17
1 files changed, 1 insertions, 16 deletions
diff --git a/src/mongo/db/matcher/doc_validation_error.h b/src/mongo/db/matcher/doc_validation_error.h
index ae632080179..30d29be8516 100644
--- a/src/mongo/db/matcher/doc_validation_error.h
+++ b/src/mongo/db/matcher/doc_validation_error.h
@@ -29,29 +29,14 @@
#pragma once
-#include "mongo/base/error_extra_info.h"
#include "mongo/db/matcher/expression.h"
namespace mongo::doc_validation_error {
/**
- * Represents information about a document validation error.
- */
-class DocumentValidationFailureInfo final : public ErrorExtraInfo {
-public:
- static constexpr auto code = ErrorCodes::DocumentValidationFailure;
- static std::shared_ptr<const ErrorExtraInfo> parse(const BSONObj& obj);
- explicit DocumentValidationFailureInfo(const BSONObj& err) : _details(err.getOwned()) {}
- const BSONObj& getDetails() const;
- void serialize(BSONObjBuilder* bob) const override;
-
-private:
- BSONObj _details;
-};
-
-/**
* Given a pointer to a MatchExpression corresponding to a collection's validator expression and a
* reference to a BSONObj corresponding to the document that failed to match against the validator
* expression, returns a BSONObj that describes why 'doc' failed to match against 'validatorExpr'.
*/
BSONObj generateError(const MatchExpression& validatorExpr, const BSONObj& doc);
+
} // namespace mongo::doc_validation_error \ No newline at end of file