AnCH Framework 0.2
Another C++ Hack: C++23 utility libraries
Loading...
Searching...
No Matches
anch::ut::AssertException Class Reference

Unit test assertion error. More...

#include <error.hpp>

Inheritance diagram for anch::ut::AssertException:
Collaboration diagram for anch::ut::AssertException:

Public Member Functions

 AssertException (const std::string &msg)
 AssertException (const std::string &msg, const std::source_location &location)
virtual ~AssertException ()
virtual const char * what () const noexcept override
const std::source_location & location () const noexcept

Detailed Description

Unit test assertion error.

Extends std::exception to provides assertion utility functions

Since
0.1
Author
Vincent Lachenal

Constructor & Destructor Documentation

◆ AssertException() [1/2]

anch::ut::AssertException::AssertException ( const std::string & msg)

AssertException constructor

Parameters
msgerror message

◆ AssertException() [2/2]

anch::ut::AssertException::AssertException ( const std::string & msg,
const std::source_location & location )

AssertException constructor

Parameters
msgerror message
locationthe failed assertion location
Since
0.2
Here is the call graph for this function:

◆ ~AssertException()

virtual anch::ut::AssertException::~AssertException ( )
virtual

AssertException destructor

Member Function Documentation

◆ location()

const std::source_location & anch::ut::AssertException::location ( ) const
noexcept

Failed assertion location getter

Returns
the location (its line is 0 when location is unknown)
Since
0.2
Here is the call graph for this function:

◆ what()

virtual const char * anch::ut::AssertException::what ( ) const
overridevirtualnoexcept

Returns error message

Returns
the message

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