I am developing a simple WinAPI application and starting to write my own claims system.
I have a macro defined as ASSERT(X)that which will do the same thing as ASSERT(X), but with additional information, lots of parameters, etc.
At some point (when this approval system was already working and working), I realized that there was a problem.
Suppose I wrote code that performs some actions using a timer and (just a simple example), this action is executed when processing a message WM_TIMER. And now the situation is changing the way this code begins to throw an assertion. This assert message will be displayed every TIMER_RESOLUTIONmilliseconds and just fills the screen.
Possible solutions to this problem:
1) Completely suspend the application (possibly also suspend all threads) when a message with a confirmation message is displayed and continues to work after it is closed.
2) Make a static counter for the statements shown and do not show statements when one of them already shows (but this does not pause the application)
3) Group similar statements and show only one for each type of statement (but this also does not pause the application)
4) Modify the application code (e.g. message loop Get / Translate / Dispatch) so that it pauses when there are any statements. This is good, but not universal and looks like a hack.
, 1 . , . , , - (- Pause ). - , ?
, - - . .