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

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2012-2014 OpenFOAM Foundation
Copyright (C) 2017 OpenCFD Ltd.
Copyright (C) 2017-2021 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -63,7 +63,7 @@ int main(int argc, char *argv[])
word utilityName(argv[1]);
autoPtr<helpType> utility;
const bool throwing = FatalError.throwExceptions();
const bool oldThrowingErr = FatalError.throwing(true);
try
{
utility.reset(helpType::New(utilityName));
@ -76,7 +76,7 @@ int main(int argc, char *argv[])
<< err.message().c_str() << nl
<< exit(FatalError);
}
FatalError.throwExceptions(throwing);
FatalError.throwing(oldThrowingErr);
utility().init();

View File

@ -105,8 +105,8 @@ void Foam::helpTypes::helpBoundary::fixedValueFieldConditions
// throw exceptions to avoid fatal errors when casting from generic patch
// type to incompatible patch type
FatalIOError.throwExceptions();
FatalError.throwExceptions();
FatalIOError.throwing(true);
FatalError.throwing(true);
bool foundFixed = false;
forAll(types, i)