Merge branch 'feature-simplify-FatalError' into 'develop'

Feature simplify fatal error

See merge request Development/OpenFOAM-plus!270
This commit is contained in:
Andrew Heather
2019-07-17 20:33:59 +01:00
299 changed files with 3421 additions and 3245 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,19 @@ 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);
FatalIOErrorInLookup
(
dict,
"faceSelection",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalIOError);
}
return autoPtr<faceSelection>(cstrIter()(name, mesh, dict));