Provides information about a xtd::diagnostics::stack_frame, which represents a function call on the call stack for the current thread.
- Namespace
- xtd::diagnostics
- Library
- xtd.core
- Examples
- The following example demonstrates the use of the xtd::diagnostics::stack_frame class to provide the stack frame information for a stack trace.
#include <xtd/xtd>
void method2(int count) {
try {
if (count < 5)
throw argument_exception("count too large", "count");
} catch (const system_exception& e) {
stack_trace st;
}
}
void method1() {
try {
method2(4);
} catch (system_exception e) {
stack_trace st;
}
}
int main() {
try {
method1();
} catch (system_exception e) {
stack_trace st;
}
}
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...
stack_frame()
Initializes a new instance of the xtd::diagnostics::stack_frame class.
The xtd::diagnostics namespace provides classes that allow you to interact with system processes,...
Definition: assert_dialog_result.h:10
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition: system_report.h:17
|
| stack_frame () |
| Initializes a new instance of the xtd::diagnostics::stack_frame class. More...
|
|
| stack_frame (bool need_file_info) |
| Initializes a new instance of the xtd::diagnostics::stack_frame class, optionally capturing source information. More...
|
|
| stack_frame (const xtd::ustring &file_name, uint32_t line_number) |
| Initializes a new instance of the xtd::diagnostics::stack_frame class that contains only the given file name, and line number. More...
|
|
| stack_frame (const xtd::ustring &file_name, uint32_t line_number, const xtd::ustring &method_name) |
| Initializes a new instance of the xtd::diagnostics::stack_frame class that contains only the given file name, line number, and method name. More...
|
|
| stack_frame (const xtd::ustring &file_name, uint32_t line_number, const xtd::ustring &method_name, uint32_t column_number) |
| Initializes a new instance of the xtd::diagnostics::stack_frame class that contains only the given file name, line number, and column number. More...
|
|
| stack_frame (const xtd::ustring &file_name, uint32_t line_number, const xtd::ustring &method_name, uint32_t column_number, uint32_t offset) |
| Initializes a new instance of the xtd::diagnostics::stack_frame class that contains only the given file name, line number, column number, method name, and offset. More...
|
|
| stack_frame (const xtd::ustring &file_name, uint32_t line_number, uint32_t column_number) |
| Initializes a new instance of the xtd::diagnostics::stack_frame class that contains only the given file name, line number, and column number. More...
|
|
| stack_frame (size_t skip_frame) |
| Initializes a new instance of the xtd::diagnostics::stack_frame class that corresponds to a frame above the current stack frame. More...
|
|
| stack_frame (size_t skip_frame, bool need_file_info) |
| Initializes a new instance of the xtd::diagnostics::stack_frame class that corresponds to a frame above the current stack frame, optionally capturing source information. More...
|
|
virtual uint32_t | get_file_column_number () const |
| Gets the column number in the file that contains the code that is executing. This information is typically extracted from the debugging symbols for the executable. More...
|
|
virtual uint32_t | get_file_line_number () const |
| Gets the line number in the file that contains the code that is executing. This information is typically extracted from the debugging symbols for the executable. More...
|
|
virtual const xtd::ustring & | get_file_name () const |
| Gets the file name that contains the code that is executing. This information is typically extracted from the debugging symbols for the executable. More...
|
|
virtual const xtd::ustring & | get_method () const |
| Gets the method in which the frame is executing. More...
|
|
virtual uint32_t | get_offset () const |
| Gets the offset from the start of the code for the method that is being executed. More...
|
|
xtd::ustring | to_string () const noexcept override |
| Builds a readable representation of the stack trace. More...
|
|
| object ()=default |
| Create a new instance of the ultimate base class object. More...
|
|
virtual bool | equals (const object &obj) const noexcept |
| Determines whether the specified object is equal to the current object. More...
|
|
virtual size_t | get_hash_code () const noexcept |
| Serves as a hash function for a particular type. More...
|
|
template<typename object_t > |
std::unique_ptr< object_t > | memberwise_clone () const |
| Gets the type of the current instance. More...
|
|