#define chsv_list_of_exceptions Chusov::Exceptions::Implementation::ExceptionStack_t::get_list() |
#include <chsvexception.h>
Returns a list of registered exceptions thrown within a current thread with the front elements being the top-level functions and the back elements being the deepest stack calls.
The macro resolves to a reference to the standard [std::list] object containing wide string definitions of functions participated in stack unwinding and whose definitions also include chsv_monitor_exceptions
(or its debug-only chsv_monitor_exceptions_debug macro). An element of the list is defined as two triplets of strings describing a file name containing the function definition, a number of a line within the file with the corresponding invocation of the chsv_monitor_exceptions macro, and the function name itself. One triplet contains multibyte strings (i.e. of char
type of symbols), and the other one holds their wide versions.
To retrieve the wide strings, which are represented as constant wide C strings (i.e. as pointers of the const
wchar_t*
type), invoke File()
, Line()
and Function()
methods of the list elements without any parameters. Also, Record()
method can be called to get an [std::wstring] object composed of all of the three strings.
Alternatively, the wchar_t
type can be specified as template arguments of the functions.
To get multibyte variants of the strings specify the type char
as a template parameter (e.g. chsv_list_of_exceptions.Record<char>()).