CppCommon
1.0.4.1
C++ Common Library
|
Exceptions handler. More...
#include <exceptions_handler.h>
Public Member Functions | |
ExceptionsHandler (const ExceptionsHandler &)=delete | |
ExceptionsHandler (ExceptionsHandler &&)=delete | |
~ExceptionsHandler () | |
ExceptionsHandler & | operator= (const ExceptionsHandler &)=delete |
ExceptionsHandler & | operator= (ExceptionsHandler &&)=delete |
Public Member Functions inherited from CppCommon::Singleton< ExceptionsHandler > | |
Singleton (const Singleton &)=delete | |
Singleton (Singleton &&)=delete | |
Singleton & | operator= (const Singleton &)=delete |
Singleton & | operator= (Singleton &&)=delete |
Static Public Member Functions | |
static void | SetupHandler (const std::function< void(const SystemException &, const StackTrace &)> &handler) |
Setup new global exceptions handler function. More... | |
static void | SetupProcess () |
Setup exceptions handler for the current process. More... | |
static void | SetupThread () |
Setup exceptions handler for the current thread. More... | |
Static Public Member Functions inherited from CppCommon::Singleton< ExceptionsHandler > | |
static ExceptionsHandler & | GetInstance () |
Get singleton instance. More... | |
Exceptions handler.
Exceptions handler allows to setup special handlers for all process and thread exceptions. This allows to catch different kinds of unhandled exceptions, signals, process abort and termination. As the result corresponding exception will be routed to the global exceptions handler function (default one will print the exception in std::cerr with a full stack-trace) and the dump file will be created.
Not thread-safe.
Definition at line 32 of file exceptions_handler.h.
|
delete |
|
delete |
CppCommon::ExceptionsHandler::~ExceptionsHandler | ( | ) |
Definition at line 650 of file exceptions_handler.cpp.
|
delete |
|
delete |
|
static |
Setup new global exceptions handler function.
This method should be called once for the current process. It is recommended to call the method just after the current process start!
handler | - Exceptions handler function |
Definition at line 656 of file exceptions_handler.cpp.
|
static |
Setup exceptions handler for the current process.
This method should be called once for the current process. It is recommended to call the method just after the current process start!
Definition at line 657 of file exceptions_handler.cpp.
|
static |
Setup exceptions handler for the current thread.
This method should be called once for the current thread. It is recommended to call the method just after the current thread start!
Definition at line 658 of file exceptions_handler.cpp.