KiCad PCB EDA Suite
|
An exception class to represent a WX assertion. More...
#include <wx_assert.h>
Public Member Functions | |
WX_ASSERT_ERROR (const wxString &aFile, int aLine, const wxString &aFunc, const wxString &aCond, const wxString &aMsg) | |
const char * | what () const noexcept override |
Public Attributes | |
std::string | m_file |
int | m_line |
std::string | m_func |
std::string | m_cond |
std::string | m_msg |
std::string | m_format_msg |
An exception class to represent a WX assertion.
In normal programs, this is popped as a dialog, but in unit tests, it prints a fairly unhelpful stack trace and otherwise doesn't inform the test runner.
We want to raise a formal exception to allow us to catch it with things like BOOST_CHECK_THROW if expected, or for the test case to fail if not expected.
Definition at line 46 of file wx_assert.h.
KI_TEST::WX_ASSERT_ERROR::WX_ASSERT_ERROR | ( | const wxString & | aFile, |
int | aLine, | ||
const wxString & | aFunc, | ||
const wxString & | aCond, | ||
const wxString & | aMsg | ||
) |
Definition at line 30 of file wx_assert.cpp.
References m_cond, m_file, m_format_msg, m_func, m_line, and m_msg.
|
overridenoexcept |
Definition at line 47 of file wx_assert.cpp.
References m_format_msg.
std::string KI_TEST::WX_ASSERT_ERROR::m_cond |
Definition at line 59 of file wx_assert.h.
Referenced by WX_ASSERT_ERROR().
std::string KI_TEST::WX_ASSERT_ERROR::m_file |
Definition at line 56 of file wx_assert.h.
Referenced by WX_ASSERT_ERROR().
std::string KI_TEST::WX_ASSERT_ERROR::m_format_msg |
Definition at line 62 of file wx_assert.h.
Referenced by what(), and WX_ASSERT_ERROR().
std::string KI_TEST::WX_ASSERT_ERROR::m_func |
Definition at line 58 of file wx_assert.h.
Referenced by WX_ASSERT_ERROR().
int KI_TEST::WX_ASSERT_ERROR::m_line |
Definition at line 57 of file wx_assert.h.
Referenced by WX_ASSERT_ERROR().
std::string KI_TEST::WX_ASSERT_ERROR::m_msg |
Definition at line 60 of file wx_assert.h.
Referenced by WX_ASSERT_ERROR().