Bitcoin Core 28.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 (std::string_view reason)
 
bool operator() (std::string_view s) const
 
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 294 of file setup_common.h.

Constructor & Destructor Documentation

◆ HasReason()

HasReason::HasReason ( std::string_view  reason)
inlineexplicit

Definition at line 297 of file setup_common.h.

Member Function Documentation

◆ operator()() [1/2]

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

Definition at line 299 of file setup_common.h.

◆ operator()() [2/2]

bool HasReason::operator() ( std::string_view  s) const
inline

Definition at line 298 of file setup_common.h.

Member Data Documentation

◆ m_reason

const std::string HasReason::m_reason
private

Definition at line 302 of file setup_common.h.


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