We need the magic incantation that prevents the default behavior of hiding all crash symptoms including error messages from exceptions.
#ifdef _WIN32
# include <windows.h>
# include <stdlib.h>
# include <errhandlingapi.h>
#endif
[...]
#ifdef _WIN32
// This make crashes very visible - without them, starting the
// application from cmd.exe or powershell can surprisingly hide
// any signs of a an application crash!
SetErrorMode(0);
#endif
We need the magic incantation that prevents the default behavior of hiding all crash symptoms including error messages from exceptions.