Represents a stack trace, which is an ordered collection of one or more stack frames.
Public Aliases | |
| using | stack_frame_collection = xtd::array< xtd::diagnostics::stack_frame > | 
| Represents a stack_frame collection.   | |
Public Fields | |
| static constexpr size_t | METHODS_TO_SKIP | 
| Defines the default for the number of methods to omit from the stack trace. This field is constant.   | |
Public Constructors | |
| stack_trace () | |
| 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, optionally capturing source information.   | |
| 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) | |
| Initializes a new instance of the xtd::diagnostics::stack_trace class using the provided exception object.   | |
| stack_trace (size_t skip_frames) | |
| Initializes a new instance of the xtd::diagnostics::stack_trace class from the caller's frame, skipping the specified number of frames.   | |
| 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 the specified number of frames.   | |
| 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, skipping the specified number of frames and optionally capturing source information.   | |
| 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.   | |
| 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 object and optionally capturing source information.   | |
Public Properties | |
| size_t | frame_count () const noexcept | 
| Gets the number of frames in the stack trace.   | |
Public Methods | |
| const xtd::diagnostics::stack_frame & | get_frame (size_t index) noexcept | 
| Gets the specified stack frame.   | |
| const stack_frame_collection & | get_frames () const noexcept | 
| Returns a copy of all stack frames in the current stack trace.   | |
| xtd::string | to_string () const noexcept override | 
| Builds a readable representation of the stack trace.   | |
Additional Inherited Members | |
  Public Member Functions inherited from xtd::object | |
| 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.   | |
| virtual type_object | get_type () const noexcept | 
| Gets the type of the current instance.   | |
| template<typename object_t > | |
| xtd::uptr< object_t > | memberwise_clone () const | 
| Creates a shallow copy of the current object.   | |
  Static Public Member Functions inherited from xtd::object | |
| template<typename object_a_t , typename object_b_t > | |
| static bool | equals (const object_a_t &object_a, const object_b_t &object_b) noexcept | 
| Determines whether the specified object instances are considered equal.   | |
| template<typename object_a_t , typename object_b_t > | |
| static bool | reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept | 
| Determines whether the specified object instances are the same instance.   | |
| using xtd::diagnostics::stack_trace::stack_frame_collection = xtd::array<xtd::diagnostics::stack_frame> | 
Represents a stack_frame collection.
| xtd::diagnostics::stack_trace::stack_trace | ( | ) | 
Initializes a new instance of the xtd::diagnostics::stack_trace class from the caller's frame.
      
  | 
  explicit | 
Initializes a new instance of the xtd::diagnostics::stack_trace class from the caller's frame, optionally capturing source information.
| need_file_info | true to capture the file name, line number, and column number; otherwise, false. | 
      
  | 
  explicit | 
Initializes a new instance of the xtd::diagnostics::stack_trace class that contains a single frame.
| frame | The frame that the xtd::diagnostics::stack_trace object should contain. | 
      
  | 
  explicit | 
Initializes a new instance of the xtd::diagnostics::stack_trace class using the provided exception object.
| exception | The exception object from which to construct the stack trace. | 
      
  | 
  explicit | 
Initializes a new instance of the xtd::diagnostics::stack_trace class from the caller's frame, skipping the specified number of frames.
| skip_frames | The number of frames up the stack from which to start the trace. | 
| xtd::diagnostics::stack_trace::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 the specified number of frames.
| exception | The exception object from which to construct the stack trace. | 
| skip_framed | The number of frames up the stack from which to start the trace. | 
| xtd::diagnostics::stack_trace::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, skipping the specified number of frames and optionally capturing source information.
| skip_frames | The number of frames up the stack from which to start the trace. | 
| need_file_info | true to capture the file name, line number, and column number; otherwise, false. | 
| 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.
| exception | The exception object from which to construct the stack trace. | 
| skip_frames | The number of frames up the stack from which to start the trace. | 
| need_file_info | true to capture the file name, line number, and column number; otherwise, false. | 
| xtd::diagnostics::stack_trace::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 object and optionally capturing source information.
| exception | The exception object from which to construct the stack trace. | 
| need_file_info | true to capture the file name, line number, and column number; otherwise, false. | 
      
  | 
  noexcept | 
Gets the number of frames in the stack trace.
      
  | 
  noexcept | 
Gets the specified stack frame.
| index | The index of the stack frame requested. | 
      
  | 
  noexcept | 
Returns a copy of all stack frames in the current stack trace.
      
  | 
  overridevirtualnoexcept | 
Builds a readable representation of the stack trace.
Reimplemented from xtd::object.
      
  | 
  staticconstexpr | 
Defines the default for the number of methods to omit from the stack trace. This field is constant.