WIN32: SetErrorMode(0)

This commit is contained in:
Michael Davidsaver
2020-05-30 17:07:21 -07:00
parent b6ee231ba8
commit 7a9d5cb6ab
18 changed files with 34 additions and 1 deletions
+13 -1
View File
@@ -1,4 +1,4 @@
/**
/**
* Copyright - See the COPYRIGHT that is included with this distribution.
* pvxs is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
@@ -12,6 +12,18 @@
namespace pvxs {
void testSetup()
{
#ifdef _WIN32
// One of the SEM_* options, either SEM_FAILCRITICALERRORS or SEM_NOGPFAULTERRORBOX,
// depending on who you ask, acts to disable Windows Error Reporting entirely.
// This also prevents the AeDebug facility from triggering.
UINT prev = SetErrorMode(0);
if(prev)
testDiag("SetErrorMode() disables 0x%x\n", (unsigned)prev);
#endif
}
void cleanup_for_valgrind()
{
for(auto& pair : instanceSnapshot()) {