|
Pol
Revision:cb584c9
|
#include <ExceptionParser.h>
Public Member Functions | |
| ExceptionParser () | |
| virtual | ~ExceptionParser () |
Static Public Member Functions | |
| static void | configureProgramAbortReportingSystem (bool active, std::string server, std::string url, std::string reporter) |
| Configures the bug reporting system. More... | |
| static std::string | getTrace () |
| Returns a string containing the current stack trace. More... | |
| static void | handleExceptionSignal (int signal) |
| Handles exceptions. More... | |
| static void | initGlobalExceptionCatching () |
| Initiates globally the exception catching (signal handlers for Linux) More... | |
| static void | logAllStackTraces () |
| Logs stack traces of all threads to stdout and error output. More... | |
| static bool | programAbortReporting () |
| Returns true if the bug reporting is active. More... | |
| static void | reportProgramAbort (const std::string &stackTrace, const std::string &reason) |
| Reports a program abort to the program devs. More... | |
Static Private Attributes | |
| static bool | m_programAbortReporting = false |
| static std::string | m_programAbortReportingReporter = "" |
| static std::string | m_programAbortReportingServer = "" |
| static std::string | m_programAbortReportingUrl = "" |
| static std::string | m_programStart = Pol::Clib::Logging::LogSink::getTimeStamp() |
Definition at line 10 of file ExceptionParser.h.
| Pol::Clib::ExceptionParser::ExceptionParser | ( | ) |
Definition at line 435 of file ExceptionParser.cpp.
|
virtual |
Definition at line 437 of file ExceptionParser.cpp.
|
static |
Configures the bug reporting system.
Definition at line 665 of file ExceptionParser.cpp.
Referenced by Pol::Core::PolConfig::read_pol_config().
|
static |
Returns a string containing the current stack trace.
Definition at line 442 of file ExceptionParser.cpp.
References MAX_STACK_TRACE_DEPTH, and MAX_STACK_TRACE_STEP_LENGTH.
Referenced by Pol::Clib::force_backtrace(), handleExceptionSignal(), Pol::Clib::handleStackTraceRequestLinux(), initGlobalExceptionCatching(), and Pol::Clib::passert_failed().
|
static |
Handles exceptions.
inform the user about the program abort
use the program abort reporting system
Definition at line 367 of file ExceptionParser.cpp.
References Pol::Clib::ProgramConfig::build_datetime(), Pol::Clib::ProgramConfig::build_target(), Pol::Clib::Logging::LogSink::getTimeStamp(), getTrace(), and reportProgramAbort().
Referenced by Pol::Clib::handleSignalLinux().
|
static |
Initiates globally the exception catching (signal handlers for Linux)
Definition at line 621 of file ExceptionParser.cpp.
References getTrace(), Pol::Clib::handleSignalLinux(), Pol::Clib::handleStackTraceRequestLinux(), and logAllStackTraces().
Referenced by Pol::Clib::ProgramMain::start().
|
static |
Logs stack traces of all threads to stdout and error output.
Definition at line 603 of file ExceptionParser.cpp.
References Pol::threadhelp::ThreadMap::CopyContents(), and Pol::threadhelp::threadmap.
Referenced by Pol::Clib::force_backtrace(), initGlobalExceptionCatching(), and Pol::Core::threadstatus_thread().
|
static |
Returns true if the bug reporting is active.
Definition at line 674 of file ExceptionParser.cpp.
Referenced by Pol::Clib::passert_failed(), and Pol::Core::PolConfig::report_program_aborts().
|
static |
Reports a program abort to the program devs.
| stackTrace | the stack trace of the abort |
| reason | a descriptive text about the reason for the abort |
set some default values if the abort occurs too early and pol.cfg wasn't parsed yet
Definition at line 317 of file ExceptionParser.cpp.
References Pol::Clib::ProgramConfig::build_datetime(), Pol::Clib::ProgramConfig::build_target(), and Pol::Clib::Logging::LogSink::getTimeStamp().
Referenced by handleExceptionSignal(), and Pol::Clib::passert_failed().
|
staticprivate |
Definition at line 56 of file ExceptionParser.h.
|
staticprivate |
Definition at line 59 of file ExceptionParser.h.
|
staticprivate |
Definition at line 57 of file ExceptionParser.h.
|
staticprivate |
Definition at line 58 of file ExceptionParser.h.
|
staticprivate |
Definition at line 60 of file ExceptionParser.h.