mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'feature-simplify-FatalError' into 'develop'
Feature simplify fatal error See merge request Development/OpenFOAM-plus!270
This commit is contained in:
@ -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));
|
||||
|
||||
Reference in New Issue
Block a user