ENH: use FatalIOErrorInLookup instead of FatalErrorInLookup

This commit is contained in:
Mark Olesen
2019-07-16 10:26:51 +02:00
committed by Andrew Heather
parent 5d0f1788e1
commit f94be1bebb
221 changed files with 1214 additions and 988 deletions

View File

@ -91,8 +91,6 @@ Foam::displacementMotionSolver::New
const pointIOField& points0
)
{
//const word solverTypeName(solverDict.get<word>("solver"));
Info<< "Selecting motion solver: " << solverTypeName << endl;
const_cast<Time&>(mesh.time()).libs().open
@ -113,12 +111,13 @@ Foam::displacementMotionSolver::New
if (!cstrIter.found())
{
FatalErrorInLookup
FatalIOErrorInLookup
(
solverDict,
"solver",
solverTypeName,
*displacementConstructorTablePtr_
) << exit(FatalError);
) << exit(FatalIOError);
}
return autoPtr<displacementMotionSolver>

View File

@ -31,11 +31,11 @@ License
Foam::autoPtr<Foam::solidBodyMotionFunction> Foam::solidBodyMotionFunction::New
(
const dictionary& SBMFCoeffs,
const dictionary& dict,
const Time& runTime
)
{
const word motionType(SBMFCoeffs.get<word>("solidBodyMotionFunction"));
const word motionType(dict.get<word>("solidBodyMotionFunction"));
Info<< "Selecting solid-body motion function " << motionType << endl;
@ -43,15 +43,16 @@ Foam::autoPtr<Foam::solidBodyMotionFunction> Foam::solidBodyMotionFunction::New
if (!cstrIter.found())
{
FatalErrorInLookup
FatalIOErrorInLookup
(
dict,
"solidBodyMotionFunction",
motionType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
) << exit(FatalIOError);
}
return autoPtr<solidBodyMotionFunction>(cstrIter()(SBMFCoeffs, runTime));
return autoPtr<solidBodyMotionFunction>(cstrIter()(dict, runTime));
}

View File

@ -134,12 +134,13 @@ Foam::autoPtr<Foam::motionSolver> Foam::motionSolver::New
if (!cstrIter.found())
{
FatalErrorInLookup
FatalIOErrorInLookup
(
solverDict,
"solver",
solverName,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
) << exit(FatalIOError);
}
return autoPtr<motionSolver>(cstrIter()(mesh, solverDict));