ENH: Inform users that the functionObject in question is disabled when it throws FatalErrorInFunction-type warnings
Functionality to add/problem to solve
I initialised a variable in the constructor of a (developing) functionObject via a function call which involves a check with FatalErrorInFunction
:
bool Foam::functionObjects::myFunctionObject::isTemporalVariant
(
const bool runTimeModifiable
) const
{
if (runTimeModifiable)
{
FatalErrorInFunction
<< "Available only for fixed time-step computations."
<< exit(FatalError);
}
return false;
}
//... Member initialiser list in the constructor
isTemporalVariant_(isTemporalVariant(runTime.runTimeModifiable())),
//...
FatalErrorInFunction
is called when the user sets controlDict\runTimeModifiable true
.
FatalErrorInFunction
throws FOAM Warning
instead of FOAM FATAL ERROR
.
-> FOAM Warning :
Available only for fixed time-step computations.
From function bool Foam::functionObjects::myFunctionObject::isTemporalVariant(bool) const
in file streamingTotalDMD.C at line 53.
From function bool Foam::functionObjectList::read()
in file db/functionObjects/functionObjectList/functionObjectList.C at line 896
--> while loading function object 'myFunctionObject1'
Yet, IMHO, the user was not informed that the functionObject is disabled, and the computation is let to run.
Target audience
Users of functionObjects.
Proposal
Append information stating that the relevant functionObject is disabled, and the remaining functionObjects and the computation itself are allowed to continue their run.
What does success look like, and how can we measure that?
N/A
Links / references
N/A
Funding
N/A