OCamlPro / gnucobol

A clone of the sourceforge GnuCOBOL compiler from COBOL to C.
https://get-superbol.com
GNU Lesser General Public License v3.0
22 stars 24 forks source link

Disable Windows error popups under testing environments #172

Closed ddeclerck closed 3 months ago

ddeclerck commented 3 months ago

This silences the Windows error popups under testing environments (turns them into actual errors on stderr).

This required the use of _CrtSetReportMode, as the use of SetErrorMode did not help.

ddeclerck commented 3 months ago

Should be good this time.

Just wondering about the condition: should we keep the popups only when there is a debugger present AND DEBUG_POPUPS_WANTED is set, or when either there is a debugger present OR DEBUG_POPUPS_WANTED is set ?

GitMensch commented 3 months ago

"or", so that's fine for commit upstream (libcob) and the CI definition(s) here

ddeclerck commented 3 months ago

"or", so that's fine for commit

Is it ? I think I have to replace || by && in the condition (the test is backwards ; when it evaluates to true, the popups are disabled).

GitMensch commented 3 months ago

I'm sure you'll do the right thing for the spec "either debugger is running or that environment variable is set" 💪 .

ddeclerck commented 3 months ago

Merged on SVN @ 5315.

GitMensch commented 3 months ago

after a rebase this leaves only the CI adjustment - which should go to https://github.com/OCamlPro/gnucobol/pull/172 - so closing this