I am using the google test framework on windows either interactively within Visual studio or non-interactive on a build server. When running interactively I have set the environment variable GTEST_CATCH_EXCEPTIONS=0 so I land in the debugger in case of an exception on the build server this is set to 1.
Now I wonder how I can figure out weather this is set or not inside a test. This could certainly be done using the Windows API, but I think the google test framework configuration could also be accessed directly somehow, just could not figure so far.
You can use the bool variable
testing::GTEST_FLAG(catch_exceptions)to determine this.