ENH: use FatalErrorInLookup macros (#1362)

This commit is contained in:
Mark Olesen
2019-07-12 18:00:00 +02:00
committed by Andrew Heather
parent 1d86fc4f6b
commit fb09f56aba
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 |
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2012-2016 OpenFOAM Foundation
@ -68,18 +68,18 @@ Foam::autoPtr<Foam::faceSelection> Foam::faceSelection::New
const dictionary& dict
)
{
const word sampleType(dict.get<word>("type"));
const word modelType(dict.get<word>("type"));
auto cstrIter = dictionaryConstructorTablePtr_->cfind(sampleType);
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown faceSelection type "
<< sampleType << nl << nl
<< "Valid faceSelection types :" << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
FatalErrorInLookup
(
"faceSelection",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
}
return autoPtr<faceSelection>(cstrIter()(name, mesh, dict));