ENH: use consistent naming when toggling exception throwing on/off

This commit is contained in:
Mark Olesen
2021-11-01 13:37:11 +01:00
parent fddf8a8832
commit 851be8ea33
26 changed files with 119 additions and 111 deletions

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2017-2020 OpenCFD Ltd.
Copyright (C) 2017-2021 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -40,7 +40,7 @@ void predicateTests_label(const word& optName, const argList& args)
{
Info<< "predicate tests for " << optName << nl;
const bool throwingError = FatalError.throwExceptions();
const bool oldThrowingError = FatalError.throwing(true);
try
{
label val;
@ -52,7 +52,7 @@ void predicateTests_label(const word& optName, const argList& args)
<< err << nl << endl;
}
FatalError.throwExceptions(throwingError);
FatalError.throwing(oldThrowingError);
}
@ -60,7 +60,7 @@ void predicateTests_scalar(const word& optName, const argList& args)
{
Info<< "predicate tests for " << optName << nl;
const bool throwingError = FatalError.throwExceptions();
const bool oldThrowingError = FatalError.throwing(true);
try
{
scalar val;
@ -72,7 +72,7 @@ void predicateTests_scalar(const word& optName, const argList& args)
<< err << nl << endl;
}
FatalError.throwExceptions(throwingError);
FatalError.throwing(oldThrowingError);
}