ENH: use FatalErrorInLookup macros (#1362)

This commit is contained in:
Mark Olesen
2019-07-12 18:00:00 +02:00
parent 26f981aaf1
commit fef6cc1818
290 changed files with 2634 additions and 2736 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2011-2016 OpenFOAM Foundation
@ -38,23 +38,21 @@ Foam::autoPtr<Foam::polyMeshModifier> Foam::polyMeshModifier::New
const polyTopoChanger& mme
)
{
if (debug)
{
InfoInFunction << "Constructing polyMeshModifier" << endl;
}
DebugInFunction << "Constructing polyMeshModifier" << endl;
const word modifierType(dict.get<word>("type"));
const word modelType(dict.get<word>("type"));
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modifierType);
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
if (!cstrIter.found())
{
FatalIOErrorInFunction(dict)
<< "Unknown polyMeshModifier type "
<< modifierType << nl << nl
<< "Valid polyMeshModifier types :" << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalIOError);
FatalIOErrorInLookup
(
dict,
"polyMeshModifier",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalIOError);
}
return autoPtr<polyMeshModifier>(cstrIter()(name, dict, index, mme));