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

@ -68,17 +68,19 @@ Foam::surfaceFeaturesExtraction::method::New
const dictionary& dict
)
{
const word methodName(dict.get<word>("extractionMethod"));
const word modelType(dict.get<word>("extractionMethod"));
auto cstrIter = dictionaryConstructorTablePtr_->cfind(methodName);
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
if (!cstrIter.found())
{
FatalIOErrorInFunction(dict)
<< "Unknown extractionMethod " << methodName << nl << nl
<< "Valid extraction methods:" << nl
<< flatOutput(dictionaryConstructorTablePtr_->sortedToc())
<< exit(FatalIOError);
FatalIOErrorInLookup
(
dict,
"extractionMethod",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalIOError);
}
return autoPtr<method>(cstrIter.val()(dict));