Drive Engine
1.0.0
Plateforme de reconstruction 3D
|
(Internal class) Manager for framework exceptions. More...
#include <ExceptionManager.h>
Public Member Functions | |
void | Register (ErrorHandler errorHandler) |
Registers an error handler. It override every previously registered error handler. More... | |
void | Unregister () |
Unregister any registered error handler. More... | |
void | Throw (const IException &exception) const |
Throws the given framework exception. The registered handler will be called automatically to manage the exception. More... | |
Static Public Member Functions | |
static ExceptionManager & | GetInstance () |
(Internal class) Manager for framework exceptions.
Inside the framework, any exception thrown internally but managed externally should be thrown by this manager.
Register an exception handler is highly recommended. Otherwise, any framework error will be printed to the console and will throw an unmanaged exception, which will terminate the application.
void ExceptionManager::Register | ( | ErrorHandler | errorHandler | ) |
Registers an error handler. It override every previously registered error handler.
errorHandler | The error handler. |
void ExceptionManager::Throw | ( | const IException & | exception | ) | const |
Throws the given framework exception. The registered handler will be called automatically to manage the exception.
frameworkException | The framework exception. |
void ExceptionManager::Unregister | ( | ) |
Unregister any registered error handler.
This is not recommended. By default, an error will be printed to the console and will throw an unmanaged exception, which will probably crash the application.