mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: use FatalErrorInLookup macros (#1362)
This commit is contained in:
committed by
Andrew Heather
parent
1d86fc4f6b
commit
fb09f56aba
@ -2,10 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2015 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2015-2019 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2015 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -38,20 +36,20 @@ Foam::functionObjects::runTimeControls::runTimeCondition::New
|
||||
stateFunctionObject& state
|
||||
)
|
||||
{
|
||||
const word conditionType(dict.get<word>("type"));
|
||||
const word modelType(dict.get<word>("type"));
|
||||
|
||||
Info<< "Selecting runTimeCondition " << conditionType << endl;
|
||||
Info<< "Selecting runTimeCondition " << modelType << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(conditionType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown runTimeCondition type "
|
||||
<< conditionType << nl << nl
|
||||
<< "Valid runTimeCondition types :" << nl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
FatalErrorInLookup
|
||||
(
|
||||
"runTimeCondition",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
}
|
||||
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user