Shows how to use xtd::diagnostics::stack_frame class.
#include <xtd/diagnostics/stack_frame>
#include <xtd/diagnostics/stack_trace>
#include <xtd/console>
void method2(int count) {
try {
if (count < 5)
throw;
}
}
void method1() {
try {
method2(4);
throw;
}
}
auto main()->int {
try {
method1();
}
}