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

Avoids the clutter and maintenance effort associated with providing the
function signature string.
This commit is contained in:
Henry Weller
2015-11-10 17:53:31 +00:00
parent 735ce9cce7
commit e2ef006b91
271 changed files with 851 additions and 1559 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -92,14 +92,7 @@ void Foam::helpTypes::helpBoundary::execute
bool abortVar(env("FOAM_ABORT"));
if (abortVar)
{
FatalErrorIn
(
"void Foam::helpTypes::helpBoundary::execute"
"("
"const argList&, "
"const fvMesh&"
")"
)
FatalErrorInFunction
<< "Please unset FOAM_ABORT to use this utlity"
<< exit(FatalError);
}
@ -155,27 +148,13 @@ void Foam::helpTypes::helpBoundary::execute
}
else
{
FatalErrorIn
(
"void Foam::helpTypes::helpBoundary::execute"
"("
"const argList&, "
"const fvMesh&"
")"
)
FatalErrorInFunction
<< "Unable to read field " << fieldName << exit(FatalError);
}
}
else if (args.optionReadIfPresent("fixedValue", fieldName))
{
FatalErrorIn
(
"void Foam::helpTypes::helpBoundary::execute"
"("
"const argList&, "
"const fvMesh&"
")"
)
FatalErrorInFunction
<< "-field option must be specified when using the -fixedValue "
<< "option" << exit(FatalError);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -146,15 +146,7 @@ void Foam::helpType::displayDoc
}
else
{
FatalErrorIn
(
"void Foam::helpType::displayDoc"
"("
"const word&, "
"const string&, "
"const bool"
")"
)
FatalErrorInFunction
<< "No help for type " << className << " found."
<< " Valid options include:" << SortableList<word>(parser.toc())
<< exit(FatalError);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -43,14 +43,14 @@ Foam::autoPtr<Foam::helpType> Foam::helpType::New
// exit without stack trace
if (helpTypeName == "-help")
{
FatalErrorIn("helpType::New()")
FatalErrorInFunction
<< "Valid helpType selections are:" << nl
<< dictionaryConstructorTablePtr_->sortedToc() << nl
<< exit(FatalError);
}
else
{
FatalErrorIn("helpType::New()")
FatalErrorInFunction
<< "Unknown helpType type " << helpTypeName << nl
<< "Valid helpType selections are:" << nl
<< dictionaryConstructorTablePtr_->sortedToc() << nl

View File

@ -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
@ -143,7 +143,7 @@ int main(int argc, char *argv[])
}
else
{
FatalErrorIn(args.executable())
FatalErrorInFunction
<< "Cannot find sub-entry " << entryNames[i]
<< " in entry " << args["entry"]
<< " in dictionary " << dictFileName;
@ -161,7 +161,7 @@ int main(int argc, char *argv[])
/*
if (ent[1] != token::BEGIN_BLOCK)
{
FatalErrorIn(args.executable())
FatalErrorInFunction
<< "Cannot find entry "
<< args["entry"]
<< " in dictionary " << dictFileName
@ -183,7 +183,7 @@ int main(int argc, char *argv[])
}
else
{
FatalErrorIn(args.executable())
FatalErrorInFunction
<< "Cannot find entry "
<< entryName
<< " in dictionary " << dictFileName;
@ -204,7 +204,7 @@ int main(int argc, char *argv[])
}
else
{
FatalErrorIn(args.executable())
FatalErrorInFunction
<< "Cannot open file " << dictFileName;
FatalError.exit(1);
}