#include <TracedException.h>
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. |
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
Definition at line 299 of file TracedException.h.
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] |
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.
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().
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().