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)
}
}
void method1() {
try {
method2(4);
}
}
int main() {
try {
method1();
}
}
The exception that is thrown when one of the arguments provided to a method is not valid.
Definition argument_exception.h:19
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.
Represents a stack trace, which is an ordered collection of one or more stack frames.
Definition stack_trace.h:32
xtd::ustring to_string() const noexcept
Builds a readable representation of the stack trace.
Defines the base class for predefined exceptions in the xtd namespace.
Definition system_exception.h:24
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.
|
|
| stack_frame (bool need_file_info) |
| Initializes a new instance of the xtd::diagnostics::stack_frame class, optionally capturing source information.
|
|
| 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.
|
|
| 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.
|
|
| 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.
|
|
| 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.
|
|
| 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.
|
|
| 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.
|
|
| 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.
|
|
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.
|
|
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.
|
|
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.
|
|
virtual const xtd::ustring & | get_method () const |
| Gets the method in which the frame is executing.
|
|
virtual uint32_t | get_offset () const |
| Gets the offset from the start of the code for the method that is being executed.
|
|
xtd::ustring | to_string () const noexcept override |
| Builds a readable representation of the stack trace.
|
|
| object ()=default |
| Create a new instance of the ultimate base class object.
|
|
virtual bool | equals (const object &obj) const noexcept |
| Determines whether the specified object is equal to the current object.
|
|
virtual size_t | get_hash_code () const noexcept |
| Serves as a hash function for a particular type.
|
|
template<typename object_t > |
std::unique_ptr< object_t > | memberwise_clone () const |
| Gets the type of the current instance.
|
|
virtual xtd::ustring | to_string () const noexcept |
| Returns a std::string that represents the current object.
|
|