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();
}
}
The exception that is thrown when one of the arguments provided to a method is not valid.
Definition argument_exception.hpp:23
static console_key_info read_key()
Obtains the next character or function key pressed by the user. The pressed key is displayed in the c...
static void write_line()
Writes the current line terminator to the standard output stream using the specified format informati...
Provides information about a xtd::diagnostics::stack_frame, which represents a function call on the c...
Definition stack_frame.hpp:48
Represents a stack trace, which is an ordered collection of one or more stack frames.
Definition stack_trace.hpp:40
The exception that is thrown when a method call is invalid for the object's current state.
Definition system_exception.hpp:18
The xtd::diagnostics namespace provides classes that allow you to interact with system processes,...
Definition assert_dialog_result.hpp:10
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8