Bitcoin Core  22.99.0
P2P Digital Currency
Public Member Functions | Private Attributes | List of all members
HasReason Class Reference

BOOST_CHECK_EXCEPTION predicates to check the specific validation error. More...

#include <setup_common.h>

Public Member Functions

 HasReason (const std::string &reason)
 
bool operator() (const std::exception &e) const
 

Private Attributes

const std::string m_reason
 

Detailed Description

BOOST_CHECK_EXCEPTION predicates to check the specific validation error.

Use as BOOST_CHECK_EXCEPTION(code that throws, exception type, HasReason("foo"));

Definition at line 217 of file setup_common.h.

Constructor & Destructor Documentation

◆ HasReason()

HasReason::HasReason ( const std::string &  reason)
inlineexplicit

Definition at line 220 of file setup_common.h.

Member Function Documentation

◆ operator()()

bool HasReason::operator() ( const std::exception &  e) const
inline

Definition at line 221 of file setup_common.h.

Member Data Documentation

◆ m_reason

const std::string HasReason::m_reason
private

Definition at line 224 of file setup_common.h.


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