xtd 0.2.0
Loading...
Searching...
No Matches

◆ stack_trace() [8/9]

xtd::diagnostics::stack_trace::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 object, skipping the specified number of frames and optionally capturing source information.

Parameters
exceptionThe exception object from which to construct the stack trace.
skip_framesThe number of frames up the stack from which to start the trace.
need_file_infotrue to capture the file name, line number, and column number; otherwise, false.
Remarks
The resulting stack trace describes the stack at the time of the exception.
If the number of frames to skip is greater than or equal to the total number of frames on the call stack at the time the instance is created, the xtd::diagnostics::stack_trace will contain no frames.