Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/CoinError.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ bool COINUTILSLIB_EXPORT CoinError::printErrors_ = false;

/** A function to block the popup windows that windows creates when the code
crashes */
#ifdef HAVE_WINDOWS_H
#ifdef _MSC_VER
#include <windows.h>
#include <stdlib.h>
COINUTILSLIB_EXPORT
void WindowsErrorPopupBlocker()
{
SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX);
_set_abort_behavior(0, _WRITE_ABORT_MSG);
}
#else
COINUTILSLIB_EXPORT
Expand Down
3 changes: 3 additions & 0 deletions test/unitTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ void testingMessage( const char * const msg );

int main (int argc, const char *argv[])
{
// Stop Windows popup
WindowsErrorPopupBlocker();

/*
Set default location for Data directory, assuming traditional
package layout.
Expand Down