Flow123d  JS_before_hm-2115-gf629a871a
Public Member Functions | Private Attributes | List of all members
StackTrace Class Reference

Class representing stacktrace of exceptions. More...

#include <stack_trace.hh>

Public Member Functions

 StackTrace ()
 Default constructor, fill stacktrace. More...
 
 StackTrace (const StackTrace &other)
 Copy constructor. More...
 
 ~StackTrace ()
 Destructor. More...
 
void print (std::ostream &out, std::vector< std::string > frames_to_cut=std::vector< std::string >()) const
 Prints formated stacktrace into given stream out. More...
 

Private Attributes

char ** frames_
 Array of backtrace frames returned by glibc backtrace_symbols. More...
 
int n_frames_
 Size of stacktrace table - number of frames. More...
 

Detailed Description

Class representing stacktrace of exceptions.

Store array of backtrace frames and size of this array, method print allows to print formated stacktrace into given stream.

Definition at line 34 of file stack_trace.hh.

Constructor & Destructor Documentation

◆ StackTrace() [1/2]

StackTrace::StackTrace ( )

Default constructor, fill stacktrace.

Definition at line 33 of file stack_trace.cc.

◆ StackTrace() [2/2]

StackTrace::StackTrace ( const StackTrace other)

Copy constructor.

Definition at line 46 of file stack_trace.cc.

◆ ~StackTrace()

StackTrace::~StackTrace ( )

Destructor.

Definition at line 62 of file stack_trace.cc.

Member Function Documentation

◆ print()

void StackTrace::print ( std::ostream &  out,
std::vector< std::string >  frames_to_cut = std::vector<std::string>() 
) const

Prints formated stacktrace into given stream out.

Definition at line 72 of file stack_trace.cc.

Here is the caller graph for this function:

Member Data Documentation

◆ frames_

char** StackTrace::frames_
private

Array of backtrace frames returned by glibc backtrace_symbols.

Definition at line 52 of file stack_trace.hh.

◆ n_frames_

int StackTrace::n_frames_
private

Size of stacktrace table - number of frames.

Definition at line 55 of file stack_trace.hh.


The documentation for this class was generated from the following files: