TracedException Class Reference

Base exception class of the generic generic Pro-Vocation Exception. More...

#include <TracedException.h>

Inheritance diagram for TracedException:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 TracedException (const std::string &strReason="Unknown Exception", const std::string &strFuncName="")
 standard constructor
 TracedException (const boost::format &fmtReason, const std::string &strFuncName="")
 constructor accepting boost::format as entry
virtual ~TracedException () throw ()
 destructor (yes it is ! I'm not kidding)
const std::string & GetReason () const
 Retrieve the reason that caused the exception to happen.
const std::string GetClassStack () const
 Retrieve the function stack at the moment the exception happened.
void UpdateFunctionStack (const std::string &strFuncName)
 Append a function to the Function trace stack.

Static Public Member Functions

static void SignalHandler (int sigint)
 Catches kernel signals and translate them to PVExceptions.

Private Attributes

std::string m_Reason
 Explanation on what raised the exception.
std::vector< std::string > m_FuncStack
 The guarded section stack from the function that raised the exception to the current handler.


Detailed Description

Base exception class of the generic generic Pro-Vocation Exception.

Handle global protection faults and user defined exception The exception handling system is assured by a class and a set of macro. During stack unwinding, the class keep track of all guarded section it pass by, then making it easy for the programmer to know where it was raised

Author:
KinoX

Definition at line 299 of file TracedException.h.


Constructor & Destructor Documentation

TracedException::TracedException ( const std::string &  strReason = "Unknown Exception",
const std::string &  strFuncName = "" 
)

standard constructor

Definition at line 64 of file TracedException.cpp.

References UpdateFunctionStack().

Referenced by SignalHandler().

TracedException::TracedException ( const boost::format &  fmtReason,
const std::string &  strFuncName = "" 
)

constructor accepting boost::format as entry

Definition at line 71 of file TracedException.cpp.

References UpdateFunctionStack().

TracedException::~TracedException (  )  throw () [virtual]

destructor (yes it is ! I'm not kidding)

Definition at line 79 of file TracedException.cpp.


Member Function Documentation

const std::string TracedException::GetClassStack (  )  const

Retrieve the function stack at the moment the exception happened.

Definition at line 94 of file TracedException.cpp.

References m_FuncStack.

const std::string & TracedException::GetReason (  )  const

Retrieve the reason that caused the exception to happen.

Definition at line 89 of file TracedException.cpp.

References m_Reason.

void TracedException::SignalHandler ( int  sigint  )  [static]

Catches kernel signals and translate them to PVExceptions.

TRACED_EXCEPTION_USES_SEH.

Todo:
extract some context infos

Definition at line 213 of file TracedException.cpp.

References TracedException().

void TracedException::UpdateFunctionStack ( const std::string &  strFuncName  ) 

Append a function to the Function trace stack.

Definition at line 244 of file TracedException.cpp.

References m_FuncStack.

Referenced by TracedException().


Member Data Documentation

std::vector<std::string> TracedException::m_FuncStack [private]

The guarded section stack from the function that raised the exception to the current handler.

Definition at line 332 of file TracedException.h.

Referenced by GetClassStack(), and UpdateFunctionStack().

std::string TracedException::m_Reason [private]

Explanation on what raised the exception.

Definition at line 331 of file TracedException.h.

Referenced by GetReason().


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

Generated on Sun Jan 17 11:39:29 2010 for PVLE (Pro-Vocation Light Engine) by  doxygen 1.5.9