carb::assert::disableDialog

Defined in carb/assert/AssertUtils.h

inline bool carb::assert::disableDialog(bool disable)

Disables the assertion failure dialog for the process.

Remark

By default this dialog only shows on Windows when not attached to a debugger. Disabling the dialog is useful for test apps or unit tests that want to run in a ‘headless’ mode but that may still trigger assertions. In this case, at least if the assertion fails and the process possibly crashes, it won’t be stuck waiting on user input.

Parameters

disable[in] true to disable the assertion dialog from appearing. false to enable the assertion dialog.

Returns

The previous value of the disableDialog flag, in other words: true if the dialog was previously disabled; false if the dialog was previously enabled.