# EmergencyHandler

class EmergencyHandler

  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.

  An EmergencyHandler is set by calling HPS::Database::SetEmergencyHandler. Only one EmergencyHandler can be set on the Database. If you try to set a second handler, the first one will be overwritten.

  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.

  Public Functions

  inline EmergencyHandler()

    A constructor for an EmergencyHandler.

  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.

  virtual ~EmergencyHandler()

  Public Static Functions

  static inline void operator delete(void *in_ptr, size_t in_size)
  static inline void *operator new(size_t in_size)

Hello I'm HOOPSY!

HOOPSY BETA

Hello I am HOOPSY! your Docs generative AI assistant.

Ask me anything about HOOPS Visualize HPS or choose a sample question below to start a conversation:

Additional info

HOOPSY may store chats to provide and maintain the service according to OpenAI's data policy.

This feature is currently experimental. While we are continually enhancing its performance and quality, the underlying AI model may generate inaccurate or fabricated responses, especially if prompted to do so.

New Conversation
Continue generating