MongoDB  2.7.0
Public Member Functions | List of all members
mongo::ScopedFailPoint Class Reference

Helper class for making sure that FailPoint::shouldFailCloseBlock is called when FailPoint::shouldFailOpenBlock was called. More...

#include <fail_point.h>

Public Member Functions

 ScopedFailPoint (FailPoint *failPoint)
 
bool isActive ()
 
const BSONObjgetData () const
 

Detailed Description

Helper class for making sure that FailPoint::shouldFailCloseBlock is called when FailPoint::shouldFailOpenBlock was called.

This should only be used within the MONGO_FAIL_POINT_BLOCK macro.

Member Function Documentation

const BSONObj & mongo::ScopedFailPoint::getData ( ) const
Returns
the data stored in the fail point. isActive must be true before you can call this.
bool mongo::ScopedFailPoint::isActive ( )
inline
Returns
true if fail point is on. This will be true at most once.

The documentation for this class was generated from the following files: