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

◆ stack_trace() [3/9]

xtd::diagnostics::stack_trace::stack_trace ( const xtd::diagnostics::stack_frame frame)
explicit

Initializes a new instance of the xtd::diagnostics::stack_trace class that contains a single frame.

Parameters
frameThe frame that the xtd::diagnostics::stack_trace object should contain.
Examples
The following code example writes stack trace information to an event log entry.
stack_frame fr(1, true);
stack_trace st(fr);
debug::write_line(string::format("{}\n{}", fr.get_method(), st.to_string());
static void write_line()
Writes a line terminator to the trace listeners in the listeners collection.
Definition debug.h:376
Provides information about a xtd::diagnostics::stack_frame, which represents a function call on the c...
Definition stack_frame.h:40
Represents a stack trace, which is an ordered collection of one or more stack frames.
Definition stack_trace.h:40
static basic_string format(const basic_string< char > &fmt, args_t &&... args)
Writes the text representation of the specified arguments list, to string using the specified format ...
Remarks
Use this constructor when you do not want the overhead of a full stack trace.