NSUNI/NSLAR Library a250670
Loading...
Searching...
No Matches
Panic

Provides functions to set up the callback for fatal library errors. More...

Functions

void nnl::SetGlobalPanicCB (PanicFun callback) noexcept
 Sets the global callback for fatal library errors.

Detailed Description

Provides functions to set up the callback for fatal library errors.

See also
nnl::SetGlobalPanicCB

Function Documentation

◆ SetGlobalPanicCB()

void nnl::SetGlobalPanicCB ( PanicFun callback)
noexcept

Sets the global callback for fatal library errors.

This callback is invoked by nnl::Panic() whenever the library encounters an unrecoverable state. This occurs in two cases:

  1. A contract violation (e.g., NNL_EXPECTS fails).
  2. An exception is thrown but the library is compiled without exception support.
Parameters
callbackThe function to be executed for custom error reporting or cleanup before the process terminates.
See also
NNL_EXPECTS