On Windows / C ++, I want to configure the assert dialog box to ignore the assertion forever, so I can be more aggressive with assertions. I understand how difficult it is to write the correct assert macro and I do not want to do this, just pin the dialogue code. Is there an easy way (or compressed hack) to do this?
macro-security approval article (googlecache)
update: more aggressive => use much more often for non-black errors . I want to be able to ignore the statement forever, so if a minor error statement occurs in the loop, it actually does not stop my process.
Look at _ CrtSetReportHook or the new _ CrtSetReportHook2 . You can use it to set the hook, which remembers the "seen" messages and reports them as how it is processed when they saw it again.
If "more aggressive" you mean using claims to handle errors, then you better use exceptions.
Miro Samek:
?
, assert. ( .)
, "" , , , , , bool, false.
void someFunc(...) { ... static bool bFireAssertion( false ); ASSERT( bFireAssertion || <your assertion test> ); ... }
, , , bFireAssertion true . , ASSERT .
Source: https://habr.com/ru/post/1702912/More articles:What do the NewWeb and Empty configurations mean in WSS site definitions - sharepointКакая наилучшая практика для разработки инфраструктуры импорта данных PHP? - importDynamically Generated Sentences for ASP.NET Multilingual Website - .netHow to change MessageBox.Icon - .netHow to pass a specific viewmodel to a CommandParam button? - data-bindingProblems connecting PostgreSQL - phpContent handler for loading a page - javascriptКак изменить курсор для ToolStripButton? - c#How to remove a column from JTable using drag and drop? - javaHow to access SQL Server with Cocoa (Mac OS X)? - sql-serverAll Articles