summaryrefslogtreecommitdiff
path: root/src/mongo/util/fail_point.cpp
diff options
context:
space:
mode:
authorRandolph Tan <randolph@10gen.com>2012-10-07 15:09:42 -0400
committerRandolph Tan <randolph@10gen.com>2012-10-08 14:26:23 -0400
commitc2894c34a83e8df0787e67bfca1e21dfd8e6f801 (patch)
tree70683d7889262179fec2ab3dc7f88b9eeb805893 /src/mongo/util/fail_point.cpp
parent92eca294642227dd5124b8e6233c2659c772b3de (diff)
downloadmongo-c2894c34a83e8df0787e67bfca1e21dfd8e6f801.tar.gz
SERVER-7290 Make it harder to misuse failpoint
Diffstat (limited to 'src/mongo/util/fail_point.cpp')
-rw-r--r--src/mongo/util/fail_point.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/util/fail_point.cpp b/src/mongo/util/fail_point.cpp
index 390fdb58bff..d4b773c9a5f 100644
--- a/src/mongo/util/fail_point.cpp
+++ b/src/mongo/util/fail_point.cpp
@@ -127,4 +127,10 @@ namespace mongo {
_failPoint->shouldFailCloseBlock();
}
}
+
+ const BSONObj& ScopedFailPoint::getData() const {
+ // Assert when attempting to get data without incrementing ref counter.
+ fassert(16445, _shouldClose);
+ return _failPoint->getData();
+ }
}