RSC  0.16.0
rsc::debug::DebugTools Class Referenceabstract

A class providing platform-specific runtime debugging tools, e.g. More...

#include <DebugTools.h>

Inheritance diagram for rsc::debug::DebugTools:
Inheritance graph
Collaboration diagram for rsc::debug::DebugTools:
Collaboration graph

Public Member Functions

virtual ~DebugTools ()
 
virtual std::vector< std::string > createBacktrace (const unsigned int &maxElements=20)=0
 Generates a string representation of the current thread's backtrace. More...
 
std::string formatBacktrace (const std::vector< std::string > &trace)
 
template<class ExceptionType >
std::string exceptionInfo (const ExceptionType &e)
 Generates a string giving verbose information about an exception in the given context. More...
 

Static Public Member Functions

static DebugToolsPtr newInstance ()
 

Protected Member Functions

 DebugTools ()
 

Detailed Description

A class providing platform-specific runtime debugging tools, e.g.

to generate a backtrace.

Definition at line 48 of file DebugTools.h.

Constructor & Destructor Documentation

rsc::debug::DebugTools::~DebugTools ( )
virtual

Definition at line 43 of file DebugTools.cpp.

rsc::debug::DebugTools::DebugTools ( )
protected

Definition at line 40 of file DebugTools.cpp.

Member Function Documentation

virtual std::vector<std::string> rsc::debug::DebugTools::createBacktrace ( const unsigned int &  maxElements = 20)
pure virtual

Generates a string representation of the current thread's backtrace.

Returns
backtrace string as vector of method calls

Implemented in rsc::debug::WindowsDebugTools, and rsc::debug::LinuxDebugTools.

template<class ExceptionType >
std::string rsc::debug::DebugTools::exceptionInfo ( const ExceptionType &  e)
inline

Generates a string giving verbose information about an exception in the given context.

Use this immediately after catching the exception.

Parameters
ethe exception to analyze
Template Parameters
ExceptionTypetype of the caught exception

Definition at line 73 of file DebugTools.h.

References rsc::runtime::typeName().

Here is the call graph for this function:

string rsc::debug::DebugTools::formatBacktrace ( const std::vector< std::string > &  trace)

Definition at line 54 of file DebugTools.cpp.

DebugToolsPtr rsc::debug::DebugTools::newInstance ( )
static

Definition at line 46 of file DebugTools.cpp.


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