chsvlib
chsv helper source code

◆ security_constraint_assertion_proc()

void Chusov::security_constraint_assertion_proc ( const char *  file,
unsigned  line,
const char *  func 
)
noexcept

Upon a call, if NDEBUG macro is not defined, prints out a message composed from two strings, and an integer, and calls std::abort. If NDEBUG is defined, the function does nothing.

Parameters
[in]fileThe first string. This is supposed to be a file path in which a runtime constrained violation has been detected by verify_security_constraint.
lineThe integer which is supposed to be a line, on which the offending invoking of verify_security_constraint is located within the file.
[in]funcThe second string which is supposed to be a name of a function with the offending expression.

The function can be set up to react on runtime-constraint violations detected by verify_security_constraint using set_thread_security_constraint_violation_procedure.

Unlike security_constraint_verification_proc, the function terminates (and prints out the message) only when the NDEBUG macro is not set.

See also
security_constraint_verification_proc;
set_thread_security_constraint_violation_procedure;
verify_security_constraint.