Commit e2ef006b authored by Henry Weller's avatar Henry Weller
Browse files

applications: Update ...ErrorIn -> ...ErrorInFunction

Avoids the clutter and maintenance effort associated with providing the
function signature string.
parent 735ce9cc
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -45,10 +45,8 @@ Foam::autoPtr<Foam::PDRDragModel> Foam::PDRDragModel::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"PDRDragModel::New"
) << "Unknown PDRDragModel type "
FatalErrorInFunction
<< "Unknown PDRDragModel type "
<< modelType << nl << nl
<< "Valid PDRDragModels are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -44,15 +44,8 @@ Foam::autoPtr<Foam::XiEqModel> Foam::XiEqModel::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"XiEqModel::New"
"("
" const psiuReactionThermo& thermo,"
" const compressible::RASModel& turbulence,"
" const volScalarField& Su"
")"
) << "Unknown XiEqModel type "
FatalErrorInFunction
<< "Unknown XiEqModel type "
<< modelType << nl << nl
<< "Valid XiEqModels are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -44,15 +44,8 @@ Foam::autoPtr<Foam::XiGModel> Foam::XiGModel::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"XiGModel::New"
"("
" const psiuReactionThermo& thermo,"
" const compressible::RASModel& turbulence,"
" const volScalarField& Su"
")"
) << "Unknown XiGModel type "
FatalErrorInFunction
<< "Unknown XiGModel type "
<< modelType << nl << nl
<< "Valid XiGModels are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -47,10 +47,8 @@ Foam::autoPtr<Foam::XiModel> Foam::XiModel::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"XiModel::New"
) << "Unknown XiModel type "
FatalErrorInFunction
<< "Unknown XiModel type "
<< modelType << nl << nl
<< "Valid XiModels are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -172,7 +172,7 @@ inline Foam::scalar Foam::laminarFlameSpeedModels::SCOPE::SuRef
}
else
{
FatalErrorIn("laminarFlameSpeedModels::SCOPE::SuRef(scalar phi)")
FatalErrorInFunction
<< "phi = " << phi
<< " cannot be handled by SCOPE function with the "
"given coefficients"
......@@ -210,7 +210,7 @@ inline Foam::scalar Foam::laminarFlameSpeedModels::SCOPE::Ma
}
else
{
FatalErrorIn("laminarFlameSpeedModels::SCOPE::Ma(scalar phi)")
FatalErrorInFunction
<< "phi = " << phi
<< " cannot be handled by SCOPE function with the "
"given coefficients"
......
if (mesh.nCells() != 1)
{
FatalErrorIn(args.executable())
FatalErrorInFunction
<< "Solver only applicable to single cell cases"
<< exit(FatalError);
}
......
......@@ -94,15 +94,8 @@ Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
|| mag(accommodationCoeff_) > 2.0
)
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"smoluchowskiJumpTFvPatchScalarField::"
"smoluchowskiJumpTFvPatchScalarField"
"("
" const fvPatch&,"
" const DimensionedField<scalar, volMesh>&,"
" const dictionary&"
")",
dict
) << "unphysical accommodationCoeff specified"
<< "(0 < accommodationCoeff <= 1)" << endl
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -96,14 +96,8 @@ Foam::maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
|| mag(accommodationCoeff_) > 2.0
)
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"maxwellSlipUFvPatchScalarField::maxwellSlipUFvPatchScalarField"
"("
"const fvPatch&, "
"const DimensionedField<vector, volMesh>&, "
"const dictionary&"
")",
dict
) << "unphysical accommodationCoeff_ specified"
<< "(0 < accommodationCoeff_ <= 1)" << endl
......
......@@ -7,10 +7,8 @@ if (mesh.schemesDict().readIfPresent("fluxScheme", fluxScheme))
}
else
{
FatalErrorIn
(
"rhoCentralFoam::readFluxScheme"
) << "fluxScheme: " << fluxScheme
FatalErrorInFunction
<< "fluxScheme: " << fluxScheme
<< " is not a valid choice. "
<< "Options are: Tadmor, Kurganov"
<< abort(FatalError);
......
......@@ -36,7 +36,7 @@ forAll(patches, patchi)
|| mag(wallNormal & wallNormal2) < 0.99
)
{
FatalErrorIn(args.executable())
FatalErrorInFunction
<< "wall faces are not parallel for patches "
<< patches[patchId].name() << " and "
<< currPatch.name() << nl
......@@ -45,7 +45,7 @@ forAll(patches, patchi)
}
else
{
FatalErrorIn(args.executable()) << "number of wall faces > 2"
FatalErrorInFunction
<< nl << exit(FatalError);
}
}
......@@ -54,7 +54,7 @@ forAll(patches, patchi)
if (nWallFaces == 0)
{
FatalErrorIn(args.executable()) << "No wall patches identified"
FatalErrorInFunction
<< exit(FatalError);
}
else
......
......@@ -17,7 +17,7 @@ const word inertSpecie(thermo.lookup("inertSpecie"));
if (!composition.contains(inertSpecie))
{
FatalErrorIn(args.executable())
FatalErrorInFunction
<< "Specified inert specie '" << inertSpecie << "' not found in "
<< "species list. Available species:" << composition.species()
<< exit(FatalError);
......
......@@ -17,7 +17,7 @@ const word inertSpecie(thermo.lookup("inertSpecie"));
if (!composition.contains(inertSpecie))
{
FatalErrorIn(args.executable())
FatalErrorInFunction
<< "Specified inert specie '" << inertSpecie << "' not found in "
<< "species list. Available species:" << composition.species()
<< exit(FatalError);
......
......@@ -17,7 +17,7 @@ const word inertSpecie(thermo.lookup("inertSpecie"));
if (!composition.contains(inertSpecie))
{
FatalErrorIn(args.executable())
FatalErrorInFunction
<< "Specified inert specie '" << inertSpecie << "' not found in "
<< "species list. Available species:" << composition.species()
<< exit(FatalError);
......
......@@ -17,7 +17,7 @@ const word inertSpecie(thermo.lookup("inertSpecie"));
if (!composition.contains(inertSpecie))
{
FatalErrorIn(args.executable())
FatalErrorInFunction
<< "Specified inert specie '" << inertSpecie << "' not found in "
<< "species list. Available species:" << composition.species()
<< exit(FatalError);
......
......@@ -717,10 +717,8 @@ Foam::multiphaseMixtureThermo::surfaceTensionForce() const
if (sigma == sigmas_.end())
{
FatalErrorIn
(
"multiphaseMixtureThermo::surfaceTensionForce() const"
) << "Cannot find interface " << interfacePair(alpha1, alpha2)
FatalErrorInFunction
<< "Cannot find interface " << interfacePair(alpha1, alpha2)
<< " in list of sigma values"
<< exit(FatalError);
}
......@@ -848,12 +846,8 @@ void Foam::multiphaseMixtureThermo::correctContactAngle
if (tp == acap.thetaProps().end())
{
FatalErrorIn
(
"multiphaseMixtureThermo::correctContactAngle"
"(const phaseModel& alpha1, const phaseModel& alpha2, "
"fvPatchVectorFieldField& nHatb) const"
) << "Cannot find interface " << interfacePair(alpha1, alpha2)
FatalErrorInFunction
<< "Cannot find interface " << interfacePair(alpha1, alpha2)
<< "\n in table of theta properties for patch "
<< acap.patch().name()
<< exit(FatalError);
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -46,11 +46,8 @@ Foam::autoPtr<Foam::mixtureViscosityModel> Foam::mixtureViscosityModel::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"mixtureViscosityModel::New(const volVectorField&, "
"const surfaceScalarField&)"
) << "Unknown mixtureViscosityModel type "
FatalErrorInFunction
<< "Unknown mixtureViscosityModel type "
<< modelType << nl << nl
<< "Valid mixtureViscosityModels are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -82,13 +82,8 @@ Foam::autoPtr<Foam::relativeVelocityModel> Foam::relativeVelocityModel::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"relativeVelocityModel::New"
"("
"const dictionary&"
")"
) << "Unknown time scale model type " << modelType
FatalErrorInFunction
<< "Unknown time scale model type " << modelType
<< ", constructor not in hash table" << nl << nl
<< " Valid time scale model types are:" << nl
<< dictionaryConstructorTablePtr_->sortedToc()
......
......@@ -25,7 +25,7 @@
{
if (nAlphaSubCycles > 1)
{
FatalErrorIn(args.executable())
FatalErrorInFunction
<< "Sub-cycling is not supported "
"with the CrankNicolson ddt scheme"
<< exit(FatalError);
......@@ -36,7 +36,7 @@
}
else
{
FatalErrorIn(args.executable())
FatalErrorInFunction
<< "Only Euler and CrankNicolson ddt schemes are supported"
<< exit(FatalError);
}
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -62,10 +62,8 @@ Foam::phaseChangeTwoPhaseMixture::New
if (cstrIter == componentsConstructorTablePtr_->end())
{
FatalErrorIn
(
"phaseChangeTwoPhaseMixture::New"
) << "Unknown phaseChangeTwoPhaseMixture type "
FatalErrorInFunction
<< "Unknown phaseChangeTwoPhaseMixture type "
<< phaseChangeTwoPhaseMixtureTypeName << endl << endl
<< "Valid phaseChangeTwoPhaseMixtures are : " << endl
<< componentsConstructorTablePtr_->sortedToc()
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -46,7 +46,7 @@ Foam::autoPtr<Foam::dragModel> Foam::dragModel::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn("dragModel::New")
FatalErrorInFunction
<< "Unknown dragModelType type "
<< dragModelType << endl << endl
<< "Valid dragModel types are : " << endl
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment