8#include "../core_export.h"
10#include "../ustring.h"
16 class system_exception;
20 namespace diagnostics {
183 stack_trace(
const std::exception& exception,
size_t skip_frames,
bool need_file_info);
188 stack_trace(
const std::exception& exception,
bool need_file_info);
304 static constexpr size_t METHODS_TO_SKIP = 0;
Provides information about a xtd::diagnostics::stack_frame, which represents a function call on the c...
Definition: stack_frame.h:29
static stack_frame empty() noexcept
Return an empty stack frame.
Represents a stack trace, which is an ordered collection of one or more stack frames.
Definition: stack_trace.h:32
stack_trace(size_t skip_frames, bool need_file_info)
Initializes a new instance of the xtd::diagnostics::stack_trace class from the caller's frame,...
std::vector< xtd::diagnostics::stack_frame > stack_frame_collection
Represents a stack_frame collection.
Definition: stack_trace.h:35
stack_trace(const std::exception &exception, size_t skip_frames)
Initializes a new instance of the StackTrace class using the provided exception object and skipping t...
stack_trace(const std::exception &exception, bool need_file_info)
Initializes a new instance of the xtd::diagnostics::stack_trace class, using the provided exception o...
size_t frame_count() const
Gets the number of frames in the stack trace.
stack_trace(const xtd::diagnostics::stack_frame &frame)
Initializes a new instance of the xtd::diagnostics::stack_trace class that contains a single frame.
stack_trace(const std::exception &exception, size_t skip_frames, bool need_file_info)
Initializes a new instance of the xtd::diagnostics::stack_trace class using the provided exception ob...
const stack_frame_collection & get_frames() const
Returns a copy of all stack frames in the current stack trace.
const xtd::diagnostics::stack_frame & get_frame(size_t index)
Gets the specified stack frame.
stack_trace(size_t skip_frames)
Initializes a new instance of the xtd::diagnostics::stack_trace class from the caller's frame,...
stack_trace(bool need_file_info)
Initializes a new instance of the xtd::diagnostics::stack_trace class from the caller's frame,...
stack_trace(const std::exception &exception)
Initializes a new instance of the xtd::diagnostics::stack_trace class using the provided exception ob...
stack_trace()
Initializes a new instance of the xtd::diagnostics::stack_trace class from the caller's frame.
xtd::ustring to_string() const noexcept
Builds a readable representation of the stack trace.
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition: object.h:26
Defines the base class for predefined exceptions in the xtd namespace.
Definition: system_exception.h:24
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:48
#define core_export_
Define shared library export.
Definition: core_export.h:13
std::string to_string(const value_t &value, const std::string &fmt, const std::locale &loc)
Convert a specified value into a string with specified format and locale.
Definition: to_string.h:37
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition: system_report.h:17
Contains xtd::diagnostics::stack_frame class.