CppELib 1.7.0
Loading...
Searching...
No Matches
Assertion::AssertHandler Class Referenceabstract

Interface for handling assertion failure by CHECK_ASSERT() macro. More...

#include <Assertion.h>

Public Member Functions

virtual ~AssertHandler ()
 
virtual void handle (const char *msg)=0
 Handle an assertion failure.
 

Detailed Description

Interface for handling assertion failure by CHECK_ASSERT() macro.

When CHECK_ASSERT() macro fails, the class that implements this interface handles the failure.

Constructor & Destructor Documentation

◆ ~AssertHandler()

virtual Assertion::AssertHandler::~AssertHandler ( )
inlinevirtual

Member Function Documentation

◆ handle()

virtual void Assertion::AssertHandler::handle ( const char *  msg)
pure virtual

Handle an assertion failure.

Parameters
msgMessage when assertion fails

Implement this method that never returns like this example:

void handle(const char* msg)
{
std::puts(msg);
std::abort();
}
virtual void handle(const char *msg)=0
Handle an assertion failure.

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