Commit a7a346b2 authored by Mark Olesen's avatar Mark Olesen
Browse files

STYLE: indentation for FatalIOErrorInFunction calls

parent 2fc1a169
......@@ -94,10 +94,8 @@ Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
|| mag(accommodationCoeff_) > 2.0
)
{
FatalIOErrorInFunction
(
dict
) << "unphysical accommodationCoeff specified"
FatalIOErrorInFunction(dict)
<< "unphysical accommodationCoeff specified"
<< "(0 < accommodationCoeff <= 1)" << endl
<< exit(FatalIOError);
}
......
......@@ -96,10 +96,8 @@ Foam::maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
|| mag(accommodationCoeff_) > 2.0
)
{
FatalIOErrorInFunction
(
dict
) << "unphysical accommodationCoeff_ specified"
FatalIOErrorInFunction(dict)
<< "unphysical accommodationCoeff_ specified"
<< "(0 < accommodationCoeff_ <= 1)" << endl
<< exit(FatalIOError);
}
......
......@@ -211,10 +211,8 @@ void readPoints
{
hasWarned = true;
IOWarningInFunction
(
is
) << "Points not in order starting at point " << pointi
IOWarningInFunction(is)
<< "Points not in order starting at point " << pointi
<< endl;
}
......
......@@ -465,10 +465,8 @@ Foam::conformationSurfaces::conformationSurfaces
if (unmatchedKeys.size() > 0)
{
IOWarningInFunction
(
surfacesDict
) << "Not all entries in conformationSurfaces dictionary were used."
IOWarningInFunction(surfacesDict)
<< "Not all entries in conformationSurfaces dictionary were used."
<< " The following entries were not used : "
<< unmatchedKeys.sortedToc()
<< endl;
......
......@@ -74,10 +74,8 @@ Foam::surfaceFeaturesExtraction::method::New
if (!cstrIter.found())
{
FatalIOErrorInFunction
(
dict
) << "Unknown extractionMethod " << methodName << nl << nl
FatalIOErrorInFunction(dict)
<< "Unknown extractionMethod " << methodName << nl << nl
<< "Valid extraction methods:" << nl
<< flatOutput(dictionaryConstructorTablePtr_->sortedToc())
<< exit(FatalIOError);
......
......@@ -80,10 +80,8 @@ void Foam::HashPtrTable<T, Key, Hash>::readIstream
}
else
{
FatalIOErrorInFunction
(
is
) << "incorrect first token, '(', found " << firstToken.info()
FatalIOErrorInFunction(is)
<< "incorrect first token, '(', found " << firstToken.info()
<< exit(FatalIOError);
}
}
......@@ -95,10 +93,8 @@ void Foam::HashPtrTable<T, Key, Hash>::readIstream
{
if (firstToken.pToken() != token::BEGIN_LIST)
{
FatalIOErrorInFunction
(
is
) << "incorrect first token, '(', found " << firstToken.info()
FatalIOErrorInFunction(is)
<< "incorrect first token, '(', found " << firstToken.info()
<< exit(FatalIOError);
}
......@@ -127,10 +123,8 @@ void Foam::HashPtrTable<T, Key, Hash>::readIstream
}
else
{
FatalIOErrorInFunction
(
is
) << "incorrect first token, expected <int> or '(', found "
FatalIOErrorInFunction(is)
<< "incorrect first token, expected <int> or '(', found "
<< firstToken.info()
<< exit(FatalIOError);
}
......
......@@ -189,10 +189,8 @@ Foam::Istream& Foam::operator>>
}
else
{
FatalIOErrorInFunction
(
is
) << "incorrect first token, '(', found " << firstToken.info()
FatalIOErrorInFunction(is)
<< "incorrect first token, '(', found " << firstToken.info()
<< exit(FatalIOError);
}
}
......@@ -204,10 +202,8 @@ Foam::Istream& Foam::operator>>
{
if (firstToken.pToken() != token::BEGIN_LIST)
{
FatalIOErrorInFunction
(
is
) << "incorrect first token, '(', found " << firstToken.info()
FatalIOErrorInFunction(is)
<< "incorrect first token, '(', found " << firstToken.info()
<< exit(FatalIOError);
}
......@@ -237,10 +233,8 @@ Foam::Istream& Foam::operator>>
}
else
{
FatalIOErrorInFunction
(
is
) << "incorrect first token, expected <int> or '(', found "
FatalIOErrorInFunction(is)
<< "incorrect first token, expected <int> or '(', found "
<< firstToken.info()
<< exit(FatalIOError);
}
......
......@@ -91,10 +91,8 @@ void Foam::ILList<LListBase, T>::readIstream(Istream& is, const INew& inew)
{
if (firstToken.pToken() != token::BEGIN_LIST)
{
FatalIOErrorInFunction
(
is
) << "incorrect first token, '(', found " << firstToken.info()
FatalIOErrorInFunction(is)
<< "incorrect first token, '(', found " << firstToken.info()
<< exit(FatalIOError);
}
......
......@@ -87,10 +87,8 @@ Foam::Istream& Foam::operator>>(Istream& is, LList<LListBase, T>& lst)
{
if (firstToken.pToken() != token::BEGIN_LIST)
{
FatalIOErrorInFunction
(
is
) << "incorrect first token, '(', found " << firstToken.info()
FatalIOErrorInFunction(is)
<< "incorrect first token, '(', found " << firstToken.info()
<< exit(FatalIOError);
}
......
......@@ -92,10 +92,8 @@ void Foam::LPtrList<LListBase, T>::readIstream(Istream& is, const INew& inew)
{
if (firstToken.pToken() != token::BEGIN_LIST)
{
FatalIOErrorInFunction
(
is
) << "incorrect first token, '(', found " << firstToken.info()
FatalIOErrorInFunction(is)
<< "incorrect first token, '(', found " << firstToken.info()
<< exit(FatalIOError);
}
......@@ -119,10 +117,8 @@ void Foam::LPtrList<LListBase, T>::readIstream(Istream& is, const INew& inew)
}
else
{
FatalIOErrorInFunction
(
is
) << "incorrect first token, expected <int> or '(', found "
FatalIOErrorInFunction(is)
<< "incorrect first token, expected <int> or '(', found "
<< firstToken.info()
<< exit(FatalIOError);
}
......
......@@ -107,10 +107,8 @@ void Foam::PtrList<T>::readIstream(Istream& is, const INew& inew)
{
if (firstToken.pToken() != token::BEGIN_LIST)
{
FatalIOErrorInFunction
(
is
) << "incorrect first token, '(', found " << firstToken.info()
FatalIOErrorInFunction(is)
<< "incorrect first token, '(', found " << firstToken.info()
<< exit(FatalIOError);
}
......@@ -129,10 +127,8 @@ void Foam::PtrList<T>::readIstream(Istream& is, const INew& inew)
if (is.eof())
{
FatalIOErrorInFunction
(
is
) << "Premature EOF after reading " << lastToken.info()
FatalIOErrorInFunction(is)
<< "Premature EOF after reading " << lastToken.info()
<< exit(FatalIOError);
}
......@@ -152,10 +148,8 @@ void Foam::PtrList<T>::readIstream(Istream& is, const INew& inew)
return;
}
FatalIOErrorInFunction
(
is
) << "incorrect first token, expected <int> or '(', found "
FatalIOErrorInFunction(is)
<< "incorrect first token, expected <int> or '(', found "
<< firstToken.info()
<< exit(FatalIOError);
}
......
......@@ -47,10 +47,8 @@ void Foam::CompactIOField<T, BaseType>::readFromStream(const bool valid)
}
else
{
FatalIOErrorInFunction
(
is
) << "unexpected class name " << headerClassName()
FatalIOErrorInFunction(is)
<< "unexpected class name " << headerClassName()
<< " expected " << typeName << " or " << IOField<T>::typeName
<< endl
<< " while reading object " << name()
......
......@@ -203,10 +203,8 @@ Foam::functionEntries::codeStream::getFunction
if (!dynCode.copyOrCreateFiles(true))
{
FatalIOErrorInFunction
(
parentDict
) << "Failed writing files for" << nl
FatalIOErrorInFunction(parentDict)
<< "Failed writing files for" << nl
<< dynCode.libRelPath() << nl
<< exit(FatalIOError);
}
......@@ -214,10 +212,8 @@ Foam::functionEntries::codeStream::getFunction
if (!dynCode.wmakeLibso())
{
FatalIOErrorInFunction
(
parentDict
) << "Failed wmake " << dynCode.libRelPath() << nl
FatalIOErrorInFunction(parentDict)
<< "Failed wmake " << dynCode.libRelPath() << nl
<< exit(FatalIOError);
}
}
......@@ -266,10 +262,8 @@ Foam::functionEntries::codeStream::getFunction
if (mySize < masterSize)
{
FatalIOErrorInFunction
(
parentDict
) << "Cannot read (NFS mounted) library " << nl
FatalIOErrorInFunction(parentDict)
<< "Cannot read (NFS mounted) library " << nl
<< libPath << nl
<< "on processor " << Pstream::myProcNo()
<< " detected size " << mySize
......@@ -304,10 +298,8 @@ Foam::functionEntries::codeStream::getFunction
if (!dlLibs.open(libPath, false))
{
FatalIOErrorInFunction
(
parentDict
) << "Failed loading library " << libPath << nl
FatalIOErrorInFunction(parentDict)
<< "Failed loading library " << libPath << nl
<< "Did you add all libraries to the 'libs' entry"
<< " in system/controlDict?"
<< exit(FatalIOError);
......@@ -334,10 +326,8 @@ Foam::functionEntries::codeStream::getFunction
if (!haveLib)
{
FatalIOErrorInFunction
(
parentDict
) << "Failed loading library " << libPath
FatalIOErrorInFunction(parentDict)
<< "Failed loading library " << libPath
<< " on some processors."
<< exit(FatalIOError);
}
......@@ -353,10 +343,8 @@ Foam::functionEntries::codeStream::getFunction
if (!function)
{
FatalIOErrorInFunction
(
parentDict
) << "Failed looking up symbol " << dynCode.codeName()
FatalIOErrorInFunction(parentDict)
<< "Failed looking up symbol " << dynCode.codeName()
<< " in library " << lib << exit(FatalIOError);
}
......
......@@ -159,10 +159,8 @@ bool Foam::functionEntries::includeEntry::execute
return true;
}
FatalIOErrorInFunction
(
is
) << "Cannot open include file "
FatalIOErrorInFunction(is)
<< "Cannot open include file "
<< (ifs.name().size() ? ifs.name() : rawName)
<< " while reading dictionary " << parentDict.name()
<< exit(FatalIOError);
......@@ -206,10 +204,8 @@ bool Foam::functionEntries::includeEntry::execute
return true;
}
FatalIOErrorInFunction
(
is
) << "Cannot open include file "
FatalIOErrorInFunction(is)
<< "Cannot open include file "
<< (ifs.name().size() ? ifs.name() : rawName)
<< " while reading dictionary " << parentDict.name()
<< exit(FatalIOError);
......
......@@ -108,10 +108,8 @@ bool Foam::functionEntries::includeEtcEntry::execute
return true;
}
FatalIOErrorInFunction
(
is
) << "Cannot open etc file "
FatalIOErrorInFunction(is)
<< "Cannot open etc file "
<< (ifs.name().size() ? ifs.name() : rawName)
<< " while reading dictionary " << parentDict.name()
<< exit(FatalIOError);
......@@ -143,10 +141,8 @@ bool Foam::functionEntries::includeEtcEntry::execute
return true;
}
FatalIOErrorInFunction
(
is
) << "Cannot open etc file "
FatalIOErrorInFunction(is)
<< "Cannot open etc file "
<< (ifs.name().size() ? ifs.name() : rawName)
<< " while reading dictionary " << parentDict.name()
<< exit(FatalIOError);
......
......@@ -87,10 +87,8 @@ bool Foam::primitiveEntry::expandVariable
if (str.empty())
{
FatalIOErrorInFunction
(
dict
) << "Illegal dictionary entry or environment variable name "
FatalIOErrorInFunction(dict)
<< "Illegal dictionary entry or environment variable name "
<< varName << endl << "Valid dictionary entries are "
<< dict.toc() << exit(FatalIOError);
......
......@@ -117,28 +117,22 @@ void* Foam::codedBase::loadLibrary
}
else
{
FatalIOErrorInFunction
(
contextDict
) << "Failed looking up symbol " << globalFuncName
FatalIOErrorInFunction(contextDict)
<< "Failed looking up symbol " << globalFuncName
<< nl << "from " << libPath << exit(FatalIOError);
}
}
else
{
FatalIOErrorInFunction
(
contextDict
) << "Failed looking up symbol " << globalFuncName << nl
FatalIOErrorInFunction(contextDict)
<< "Failed looking up symbol " << globalFuncName << nl
<< "from " << libPath << exit(FatalIOError);
lib = 0;
if (!libs().close(libPath, false))
{
FatalIOErrorInFunction
(
contextDict
) << "Failed unloading library "
FatalIOErrorInFunction(contextDict)
<< "Failed unloading library "
<< libPath
<< exit(FatalIOError);
}
......@@ -187,20 +181,16 @@ void Foam::codedBase::unloadLibrary
}
else
{
FatalIOErrorInFunction
(
contextDict
) << "Failed looking up symbol " << globalFuncName << nl
FatalIOErrorInFunction(contextDict)
<< "Failed looking up symbol " << globalFuncName << nl
<< "from " << libPath << exit(FatalIOError);
}
}
if (!libs().close(libPath, false))
{
FatalIOErrorInFunction
(
contextDict
) << "Failed unloading library " << libPath
FatalIOErrorInFunction(contextDict)
<< "Failed unloading library " << libPath
<< exit(FatalIOError);
}
}
......@@ -228,10 +218,8 @@ void Foam::codedBase::createLibrary
if (!dynCode.copyOrCreateFiles(true))
{
FatalIOErrorInFunction
(
context.dict()
) << "Failed writing files for" << nl
FatalIOErrorInFunction(context.dict())
<< "Failed writing files for" << nl
<< dynCode.libRelPath() << nl
<< exit(FatalIOError);
}
......@@ -239,10 +227,8 @@ void Foam::codedBase::createLibrary
if (!dynCode.wmakeLibso())
{
FatalIOErrorInFunction
(
context.dict()
) << "Failed wmake " << dynCode.libRelPath() << nl
FatalIOErrorInFunction(context.dict())
<< "Failed wmake " << dynCode.libRelPath() << nl
<< exit(FatalIOError);
}
}
......@@ -289,10 +275,8 @@ void Foam::codedBase::createLibrary
if (mySize < masterSize)
{
FatalIOErrorInFunction
(
context.dict()
) << "Cannot read (NFS mounted) library " << nl
FatalIOErrorInFunction(context.dict())
<< "Cannot read (NFS mounted) library " << nl
<< libPath << nl
<< "on processor " << Pstream::myProcNo()
<< " detected size " << mySize
......
......@@ -294,10 +294,8 @@ Foam::dimensionedScalar Foam::dimensionSet::parse
token t = tis.nextToken();
if (!t.isPunctuation() || t.pToken() != token::END_LIST)
{
FatalIOErrorInFunction
(
tis.stream()
) << "Illegal token " << t << exit(FatalIOError);
FatalIOErrorInFunction(tis.stream())
<< "Illegal token " << t << exit(FatalIOError);
}
ds.dimensions() *= sub.dimensions();
......@@ -363,18 +361,14 @@ Foam::dimensionedScalar Foam::dimensionSet::parse
}
else
{
FatalIOErrorInFunction
(
tis.stream()
) << "Illegal token " << nextToken << exit(FatalIOError);
FatalIOErrorInFunction(tis.stream())
<< "Illegal token " << nextToken << exit(FatalIOError);
}
}
else
{
FatalIOErrorInFunction
(
tis.stream()
) << "Illegal token " << nextToken << exit(FatalIOError);
FatalIOErrorInFunction(tis.stream())
<< "Illegal token " << nextToken << exit(FatalIOError);
}
......@@ -415,10 +409,8 @@ Foam::Istream& Foam::dimensionSet::read
if (startToken != token::BEGIN_SQR)
{
FatalIOErrorInFunction
(
is
) << "expected a " << token::BEGIN_SQR << " in dimensionSet"
FatalIOErrorInFunction(is)
<< "Expected a " << token::BEGIN_SQR << " in dimensionSet"
<< endl << "in stream " << is.info()
<< exit(FatalIOError);
}
......@@ -471,10 +463,8 @@ Foam::Istream& Foam::dimensionSet::read
// Check end of dimensionSet
if (nextToken != token::END_SQR)
{
FatalIOErrorInFunction
(
is
) << "expected a " << token::END_SQR << " in dimensionSet "
FatalIOErrorInFunction(is)
<< "Expected a " << token::END_SQR << " in dimensionSet "
<< endl << "in stream " << is.info()
<< exit(FatalIOError);
}
......@@ -509,10 +499,8 @@ Foam::Istream& Foam::dimensionSet::read
if (startToken != token::BEGIN_SQR)
{
FatalIOErrorInFunction
(
is
) << "expected a " << token::BEGIN_SQR << " in dimensionSet"
FatalIOErrorInFunction(is)
<< "Expected a " << token::BEGIN_SQR << " in dimensionSet"
<< endl << "in stream " << is.info()
<< exit(FatalIOError);
}
......@@ -609,10 +597,8 @@ Foam::Istream& Foam::dimensionSet::read
// Check end of dimensionSet
if (nextToken != token::END_SQR)
{