The EmergencyHandler class is the base class for an custom EmergencyHandler. An EmergencyHandler allows the developer to provide custom logic to handle ‘emergency’ situations. For example, one can set a soft memory limit using HPS::Database::SetSoftMemoryLimit. If that limit is hit, Visualize will call the EmergencyHandler.
The default emergency handler will print a few diagnostics to stdout (when run in debug mode), but will make no attempt to recover from the emergency condition.
intptr_t GetClassID() const
Returns a unique identifier that is shared by all objects of the same class.
virtual void Handle(char const *message, HPS::Emergency::Code code) = 0
Visualize will call the EmergencyHandler::Handle method if any of the handler-enabling conditions are reached. The Emergency::Code value describes the type of condition. IMPORTANT: calling any Visualize API from your EmergencyHandler::Handle function (for any emergency code) may cause a deadlock.
- intptr_t GetClassID() const