mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: support true/false, yes/no values for FOAM_ABORT (#1896)
- consistent with FOAM_SIGFPE etc. - centralize code as error::useAbort() static function to avoid scattering the logic throughout the code. ENH: also accept "0" and "1" string values for Switch - not the normal path for Switch input (eg, from a dictionary), but consistent with bool definitions and simplifies string parsing. This means that `FOAM_SIGFPE=1 application` will now also work.
This commit is contained in:
@ -71,7 +71,7 @@ namespace Foam
|
||||
//- Mimic exit handling of the error class
|
||||
static void exitNow(const error& err)
|
||||
{
|
||||
if (hasEnv("FOAM_ABORT"))
|
||||
if (error::useAbort())
|
||||
{
|
||||
Perr<< nl << err << nl
|
||||
<< "\nFOAM aborting (FOAM_ABORT set)\n" << endl;
|
||||
|
||||
Reference in New Issue
Block a user