ENH: Updated Info, Warning and Error messages

This commit is contained in:
Andrew Heather
2015-12-08 11:15:39 +00:00
parent ae95edeea4
commit eafd5a3850
94 changed files with 351 additions and 1040 deletions

View File

@ -135,7 +135,7 @@ bool Foam::averageCondition::apply()
if (unprocessedFields.size())
{
WarningIn("bool Foam::averageCondition::apply()")
WarningInFunction
<< "From function object: " << functionObjectName_ << nl
<< "Unprocessed fields:" << nl;

View File

@ -74,17 +74,7 @@ Foam::equationInitialResidualCondition::equationInitialResidualCondition
{
if (!fieldNames_.size())
{
WarningIn
(
"Foam::equationInitialResidualCondition::"
"equationInitialResidualCondition"
"("
"const word&, "
"const objectRegistry&, "
"const dictionary&, "
"functionObjectState&"
")"
)
WarningInFunction
<< "No fields supplied: deactivating" << endl;
active_ = false;
@ -151,10 +141,7 @@ bool Foam::equationInitialResidualCondition::apply()
}
default:
{
FatalErrorIn
(
"bool Foam::equationInitialResidualCondition::apply()"
)
FatalErrorInFunction
<< "Unhandled enumeration "
<< operatingModeNames[mode_]
<< abort(FatalError);
@ -168,7 +155,7 @@ bool Foam::equationInitialResidualCondition::apply()
{
if (result[i] < 0)
{
WarningIn("bool Foam::equationInitialResidualCondition::apply()")
WarningInFunction
<< "Initial residual data not found for field "
<< fieldNames_[i] << endl;
}
@ -180,7 +167,7 @@ bool Foam::equationInitialResidualCondition::apply()
if (!valid)
{
WarningIn("bool Foam::equationInitialResidualCondition::apply()")
WarningInFunction
<< "Initial residual data not found for any fields: "
<< "deactivating" << endl;

View File

@ -59,17 +59,7 @@ Foam::equationMaxIterCondition::equationMaxIterCondition
{
if (!fieldNames_.size())
{
WarningIn
(
"Foam::equationMaxIterCondition::"
"equationMaxIterCondition"
"("
"const word&, "
"const objectRegistry&, "
"const dictionary&, "
"functionObjectState&"
")"
)
WarningInFunction
<< "No fields supplied: deactivating" << endl;
active_ = false;
@ -129,7 +119,7 @@ bool Foam::equationMaxIterCondition::apply()
{
if (result[i] < 0)
{
WarningIn("bool Foam::equationMaxIterCondition::apply()")
WarningInFunction
<< "Number of iterations data not found for field "
<< fieldNames_[i] << endl;
}
@ -141,7 +131,7 @@ bool Foam::equationMaxIterCondition::apply()
if (!valid)
{
WarningIn("bool Foam::equationMaxIterCondition::apply()")
WarningInFunction
<< "Number of iterations data not found for any fields: "
<< "deactivating" << endl;

View File

@ -104,7 +104,7 @@ bool Foam::minMaxCondition::apply()
if (valueType == word::null)
{
WarningIn("bool Foam::minMaxCondition::apply()")
WarningInFunction
<< "Unable to find entry " << fieldName
<< " for function object " << functionObjectName_
<< ". Condition will not be applied."

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -44,16 +44,8 @@ Foam::autoPtr<Foam::runTimeCondition> Foam::runTimeCondition::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"runTimeCondition::New"
"("
"const word&, "
"const objectRegistry&, "
"const dictionary&, "
"functionObjectState&"
")"
) << "Unknown runTimeCondition type "
FatalErrorInFunction
<< "Unknown runTimeCondition type "
<< conditionType << nl << nl
<< "Valid runTimeCondition types are:" << nl
<< dictionaryConstructorTablePtr_->sortedToc()

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -163,7 +163,7 @@ void Foam::runTimeControl::execute()
if (conditionIter == groupMap_.end())
{
FatalErrorIn("void Foam::runTimeControl::execute()")
FatalErrorInFunction
<< "group " << groupI << " not found in map"
<< abort(FatalError);
}