ENH: use FatalErrorInLookup macros (#1362)
This commit is contained in:
@ -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));
|
||||
|
||||
Reference in New Issue
Block a user