src/OpenFOAM: Update ...IOErrorIn -> ...IOErrorInFunction

Avoids the clutter and maintenance effort associated with providing the
function signature string.
This commit is contained in:
Henry Weller
2015-11-10 21:13:04 +00:00
parent 10aea96ae5
commit cc99b65d77
84 changed files with 309 additions and 491 deletions

View File

@ -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
@ -76,9 +76,8 @@ void Foam::HashPtrTable<T, Key, Hash>::read(Istream& is, const INew& inewt)
}
else
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"HashPtrTable<T, Key, Hash>::read(Istream&, const INew&)",
is
) << "incorrect first token, '(', found " << firstToken.info()
<< exit(FatalIOError);
@ -92,9 +91,8 @@ void Foam::HashPtrTable<T, Key, Hash>::read(Istream& is, const INew& inewt)
{
if (firstToken.pToken() != token::BEGIN_LIST)
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"HashPtrTable<T, Key, Hash>::read(Istream&, const INew&)",
is
) << "incorrect first token, '(', found " << firstToken.info()
<< exit(FatalIOError);
@ -125,9 +123,8 @@ void Foam::HashPtrTable<T, Key, Hash>::read(Istream& is, const INew& inewt)
}
else
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"HashPtrTable<T, Key, Hash>::read(Istream&, const INew&)",
is
) << "incorrect first token, expected <int> or '(', found "
<< firstToken.info()

View File

@ -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
@ -145,9 +145,8 @@ Foam::Istream& Foam::operator>>
}
else
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"operator>>(Istream&, HashTable<T, Key, Hash>&)",
is
) << "incorrect first token, '(', found " << firstToken.info()
<< exit(FatalIOError);
@ -161,9 +160,8 @@ Foam::Istream& Foam::operator>>
{
if (firstToken.pToken() != token::BEGIN_LIST)
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"operator>>(Istream&, HashTable<T, Key, Hash>&)",
is
) << "incorrect first token, '(', found " << firstToken.info()
<< exit(FatalIOError);
@ -199,9 +197,8 @@ Foam::Istream& Foam::operator>>
}
else
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"operator>>(Istream&, HashTable<T, Key, Hash>&)",
is
) << "incorrect first token, expected <int> or '(', found "
<< firstToken.info()

View File

@ -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
@ -89,9 +89,8 @@ void Foam::ILList<LListBase, T>::read(Istream& is, const INew& iNew)
{
if (firstToken.pToken() != token::BEGIN_LIST)
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"operator>>(Istream&, ILList<LListBase, T>&)",
is
) << "incorrect first token, '(', found " << firstToken.info()
<< exit(FatalIOError);
@ -117,7 +116,7 @@ void Foam::ILList<LListBase, T>::read(Istream& is, const INew& iNew)
}
else
{
FatalIOErrorIn("operator>>(Istream&, ILList<LListBase, T>&)", is)
FatalIOErrorInFunction(is)
<< "incorrect first token, expected <int> or '(', found "
<< firstToken.info()
<< exit(FatalIOError);

View File

@ -90,9 +90,8 @@ Foam::Istream& Foam::operator>>(Istream& is, LList<LListBase, T>& L)
{
if (firstToken.pToken() != token::BEGIN_LIST)
{
FatalIOErrorIn
FatalIOErrorInFunction
(
" operator>>(Istream&, LList<LListBase, T>&)",
is
) << "incorrect first token, '(', found " << firstToken.info()
<< exit(FatalIOError);
@ -120,7 +119,7 @@ Foam::Istream& Foam::operator>>(Istream& is, LList<LListBase, T>& L)
}
else
{
FatalIOErrorIn(" operator>>(Istream&, LList<LListBase, T>&)", is)
FatalIOErrorInFunction(is)
<< "incorrect first token, expected <int> or '(', found "
<< firstToken.info()
<< exit(FatalIOError);

View File

@ -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
@ -94,9 +94,8 @@ void Foam::LPtrList<LListBase, T>::read(Istream& is, const INew& iNew)
{
if (firstToken.pToken() != token::BEGIN_LIST)
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"LPtrList<LListBase, T>::read(Istream&, const INew&)",
is
) << "incorrect first token, '(', found " << firstToken.info()
<< exit(FatalIOError);
@ -125,9 +124,8 @@ void Foam::LPtrList<LListBase, T>::read(Istream& is, const INew& iNew)
}
else
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"LPtrList<LListBase, T>::read(Istream&, const INew&)",
is
) << "incorrect first token, expected <int> or '(', found "
<< firstToken.info()

View File

@ -68,7 +68,7 @@ Foam::Istream& Foam::operator>>(Foam::Istream& is, FixedList<T, Size>& L)
}
else if (!firstToken.isPunctuation())
{
FatalIOErrorIn("operator>>(Istream&, FixedList<T, Size>&)", is)
FatalIOErrorInFunction(is)
<< "incorrect first token, expected <label> "
"or '(' or '{', found "
<< firstToken.info()

View File

@ -129,7 +129,7 @@ Foam::Istream& Foam::operator>>(Istream& is, List<T>& L)
{
if (firstToken.pToken() != token::BEGIN_LIST)
{
FatalIOErrorIn("operator>>(Istream&, List<T>&)", is)
FatalIOErrorInFunction(is)
<< "incorrect first token, expected '(', found "
<< firstToken.info()
<< exit(FatalIOError);
@ -146,7 +146,7 @@ Foam::Istream& Foam::operator>>(Istream& is, List<T>& L)
}
else
{
FatalIOErrorIn("operator>>(Istream&, List<T>&)", is)
FatalIOErrorInFunction(is)
<< "incorrect first token, expected <int> or '(', found "
<< firstToken.info()
<< exit(FatalIOError);
@ -167,7 +167,7 @@ Foam::List<T> Foam::readList(Istream& is)
{
if (firstToken.pToken() != token::BEGIN_LIST)
{
FatalIOErrorIn("readList<T>(Istream&)", is)
FatalIOErrorInFunction(is)
<< "incorrect first token, expected '(', found "
<< firstToken.info()
<< exit(FatalIOError);

View File

@ -306,11 +306,7 @@ Foam::Istream& Foam::PackedList<nBits>::read(Istream& is)
}
else
{
FatalIOErrorIn
(
"PackedList<nBits>::read(Istream&)",
is
)
FatalIOErrorInFunction(is)
<< "incorrect list token, expected '(' or '{', found "
<< firstTok.info()
<< exit(FatalIOError);
@ -380,11 +376,7 @@ Foam::Istream& Foam::PackedList<nBits>::read(Istream& is)
}
else
{
FatalIOErrorIn
(
"PackedList<nBits>::read(Istream&)",
is
)
FatalIOErrorInFunction(is)
<< "incorrect first token, expected '(', found "
<< firstTok.info()
<< exit(FatalIOError);
@ -392,11 +384,7 @@ Foam::Istream& Foam::PackedList<nBits>::read(Istream& is)
}
else
{
FatalIOErrorIn
(
"PackedList<nBits>::read(Istream&)",
is
)
FatalIOErrorInFunction(is)
<< "incorrect first token, expected <int>, '(' or '{', found "
<< firstTok.info()
<< exit(FatalIOError);

View File

@ -95,9 +95,8 @@ void Foam::PtrList<T>::read(Istream& is, const INew& inewt)
{
if (firstToken.pToken() != token::BEGIN_LIST)
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"PtrList<T>::read(Istream&, const INew&)",
is
) << "incorrect first token, '(', found " << firstToken.info()
<< exit(FatalIOError);
@ -118,9 +117,8 @@ void Foam::PtrList<T>::read(Istream& is, const INew& inewt)
if (is.eof())
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"PtrList<T>::read(Istream&, const INew&)",
is
) << "Premature EOF after reading " << lastToken.info()
<< exit(FatalIOError);
@ -145,9 +143,8 @@ void Foam::PtrList<T>::read(Istream& is, const INew& inewt)
}
else
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"PtrList<T>::read(Istream&, const INew&)",
is
) << "incorrect first token, expected <int> or '(', found "
<< firstToken.info()

View File

@ -162,7 +162,7 @@ Foam::Istream& Foam::operator>>(Istream& is, UList<T>& L)
if (s != L.size())
{
FatalIOErrorIn("operator>>(Istream&, UList<T>&)", is)
FatalIOErrorInFunction(is)
<< "incorrect length for UList. Read " << s
<< " expected " << L.size()
<< exit(FatalIOError);
@ -179,7 +179,7 @@ Foam::Istream& Foam::operator>>(Istream& is, UList<T>& L)
// Set list length to that read
if (s != L.size())
{
FatalIOErrorIn("operator>>(Istream&, UList<T>&)", is)
FatalIOErrorInFunction(is)
<< "incorrect length for UList. Read " << s
<< " expected " << L.size()
<< exit(FatalIOError);
@ -244,7 +244,7 @@ Foam::Istream& Foam::operator>>(Istream& is, UList<T>& L)
{
if (firstToken.pToken() != token::BEGIN_LIST)
{
FatalIOErrorIn("operator>>(Istream&, UList<T>&)", is)
FatalIOErrorInFunction(is)
<< "incorrect first token, expected '(', found "
<< firstToken.info()
<< exit(FatalIOError);
@ -258,7 +258,7 @@ Foam::Istream& Foam::operator>>(Istream& is, UList<T>& L)
if (sll.size() != L.size())
{
FatalIOErrorIn("operator>>(Istream&, UList<T>&)", is)
FatalIOErrorInFunction(is)
<< "incorrect length for UList. Read " << sll.size()
<< " expected " << L.size()
<< exit(FatalIOError);
@ -279,7 +279,7 @@ Foam::Istream& Foam::operator>>(Istream& is, UList<T>& L)
}
else
{
FatalIOErrorIn("operator>>(Istream&, UList<T>&)", is)
FatalIOErrorInFunction(is)
<< "incorrect first token, expected <int> or '(', found "
<< firstToken.info()
<< exit(FatalIOError);

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
@ -41,7 +41,7 @@ bool Foam::IOobject::readHeader(Istream& is)
{
if (rOpt_ == MUST_READ || rOpt_ == MUST_READ_IF_MODIFIED)
{
FatalIOErrorIn("IOobject::readHeader(Istream&)", is)
FatalIOErrorInFunction(is)
<< " stream not open for reading essential object from file "
<< is.name()
<< exit(FatalIOError);
@ -49,7 +49,7 @@ bool Foam::IOobject::readHeader(Istream& is)
if (IOobject::debug)
{
SeriousIOErrorIn("IOobject::readHeader(Istream&)", is)
SeriousIOErrorInFunction(is)
<< " stream not open for reading from file "
<< is.name() << endl;
}
@ -75,7 +75,7 @@ bool Foam::IOobject::readHeader(Istream& is)
const word headerObject(headerDict.lookup("object"));
if (IOobject::debug && headerObject != name())
{
IOWarningIn("IOobject::readHeader(Istream&)", is)
IOWarningInFunction(is)
<< " object renamed from "
<< name() << " to " << headerObject
<< " for file " << is.name() << endl;
@ -86,7 +86,7 @@ bool Foam::IOobject::readHeader(Istream& is)
}
else
{
IOWarningIn("IOobject::readHeader(Istream&)", is)
IOWarningInFunction(is)
<< "First token could not be read or is not the keyword 'FoamFile'"
<< nl << nl << "Check header is of the form:" << nl << endl;
@ -104,7 +104,7 @@ bool Foam::IOobject::readHeader(Istream& is)
{
if (rOpt_ == MUST_READ || rOpt_ == MUST_READ_IF_MODIFIED)
{
FatalIOErrorIn("IOobject::readHeader(Istream&)", is)
FatalIOErrorInFunction(is)
<< " stream failure while reading header"
<< " on line " << is.lineNumber()
<< " of file " << is.name()

View File

@ -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,9 +45,8 @@ void Foam::CompactIOField<T, BaseType>::readFromStream()
}
else
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"CompactIOField<T, BaseType>::readFromStream()",
is
) << "unexpected class name " << headerClassName()
<< " expected " << typeName << " or " << IOField<T>::typeName

View File

@ -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,9 +45,8 @@ void Foam::CompactIOList<T, BaseType>::readFromStream()
}
else
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"CompactIOList<T, BaseType>::readFromStream()",
is
) << "unexpected class name " << headerClassName()
<< " expected " << typeName << " or " << IOList<T>::typeName

View File

@ -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
@ -35,7 +35,7 @@ Foam::IOField<Type>::IOField(const IOobject& io)
// Temporary warning
if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED)
{
WarningIn("IOField::IOField(const IOobject&)")
WarningInFunction
<< "IOField " << name()
<< " constructed with IOobject::MUST_READ_IF_MODIFIED"
" but IOField does not support automatic rereading."
@ -65,7 +65,7 @@ Foam::IOField<Type>::IOField(const IOobject& io, const label size)
// Temporary warning
if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED)
{
WarningIn("IOField::IOField(const IOobject&, const label)")
WarningInFunction
<< "IOField " << name()
<< " constructed with IOobject::MUST_READ_IF_MODIFIED"
" but IOField does not support automatic rereading."
@ -99,7 +99,7 @@ Foam::IOField<Type>::IOField(const IOobject& io, const Field<Type>& f)
// Temporary warning
if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED)
{
WarningIn("IOField::IOField(const IOobject&, const Field<Type>&)")
WarningInFunction
<< "IOField " << name()
<< " constructed with IOobject::MUST_READ_IF_MODIFIED"
" but IOField does not support automatic rereading."
@ -133,10 +133,8 @@ Foam::IOField<Type>::IOField(const IOobject& io, const Xfer<Field<Type> >& f)
// Temporary warning
if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED)
{
WarningIn
(
"IOField::IOField(const IOobject&, const Xfer<Field<Type> >&)"
) << "IOField " << name()
WarningInFunction
<< "IOField " << name()
<< " constructed with IOobject::MUST_READ_IF_MODIFIED"
" but IOField does not support automatic rereading."
<< endl;

View File

@ -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
@ -35,7 +35,7 @@ Foam::IOList<T>::IOList(const IOobject& io)
// Temporary warning
if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED)
{
WarningIn("IOList::IOList(const IOobject&)")
WarningInFunction
<< "IOList " << name()
<< " constructed with IOobject::MUST_READ_IF_MODIFIED"
" but IOList does not support automatic rereading."
@ -64,7 +64,7 @@ Foam::IOList<T>::IOList(const IOobject& io, const label size)
// Temporary warning
if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED)
{
WarningIn("IOList::IOList(const IOobject&, const label)")
WarningInFunction
<< "IOList " << name()
<< " constructed with IOobject::MUST_READ_IF_MODIFIED"
" but IOList does not support automatic rereading."
@ -97,7 +97,7 @@ Foam::IOList<T>::IOList(const IOobject& io, const List<T>& list)
// Temporary warning
if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED)
{
WarningIn("IOList::IOList(const IOobject&, const List<T>&)")
WarningInFunction
<< "IOList " << name()
<< " constructed with IOobject::MUST_READ_IF_MODIFIED"
" but IOList does not support automatic rereading."
@ -131,10 +131,8 @@ Foam::IOList<T>::IOList(const IOobject& io, const Xfer<List<T> >& list)
// Temporary warning
if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED)
{
WarningIn
(
"IOList::IOList(const IOobject&, const Xfer<List<T> >&)"
) << "IOList " << name()
WarningInFunction
<< "IOList " << name()
<< " constructed with IOobject::MUST_READ_IF_MODIFIED"
" but IOList does not support automatic rereading."
<< endl;

View File

@ -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
@ -49,7 +49,7 @@ Foam::IOdictionary::IOdictionary(const IOobject& io)
// Temporary warning
if (debug && io.readOpt() == IOobject::MUST_READ)
{
WarningIn("IOdictionary::IOdictionary(const IOobject&)")
WarningInFunction
<< "Dictionary " << name()
<< " constructed with IOobject::MUST_READ"
" instead of IOobject::MUST_READ_IF_MODIFIED." << nl
@ -105,10 +105,8 @@ Foam::IOdictionary::IOdictionary(const IOobject& io, const dictionary& dict)
// Temporary warning
if (debug && io.readOpt() == IOobject::MUST_READ)
{
WarningIn
(
"IOdictionary::IOdictionary(const IOobject& const dictionary&)"
) << "Dictionary " << name()
WarningInFunction
<< "Dictionary " << name()
<< " constructed with IOobject::MUST_READ"
" instead of IOobject::MUST_READ_IF_MODIFIED." << nl
<< "Use MUST_READ_IF_MODIFIED if you need automatic rereading."

View File

@ -48,7 +48,7 @@ Foam::IOstream::formatEnum(const word& format)
}
else
{
WarningIn("IOstream::formatEnum(const word&)")
WarningInFunction
<< "bad format specifier '" << format << "', using 'ascii'"
<< endl;
@ -77,7 +77,7 @@ Foam::IOstream::compressionEnum(const word& compression)
}
else
{
WarningIn("IOstream::compressionEnum(const word&)")
WarningInFunction
<< "bad compression specifier '" << compression
<< "', using 'uncompressed'"
<< endl;
@ -93,10 +93,8 @@ bool Foam::IOstream::check(const char* operation) const
{
if (bad())
{
FatalIOErrorIn
(
"IOstream::check(const char*) const", *this
) << "error in IOstream " << name() << " for operation " << operation
FatalIOErrorInFunction(*this)
<< "error in IOstream " << name() << " for operation " << operation
<< exit(FatalIOError);
}
@ -108,10 +106,8 @@ void Foam::IOstream::fatalCheck(const char* operation) const
{
if (bad())
{
FatalIOErrorIn
(
"IOstream::fatalCheck(const char*) const", *this
) << "error in IOstream " << name() << " for operation " << operation
FatalIOErrorInFunction(*this)
<< "error in IOstream " << name() << " for operation " << operation
<< exit(FatalIOError);
}
}

View File

@ -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
@ -31,13 +31,13 @@ void Foam::Istream::putBack(const token& t)
{
if (bad())
{
FatalIOErrorIn("void Istream::putBack(const token&)", *this)
FatalIOErrorInFunction(*this)
<< "Attempt to put back onto bad stream"
<< exit(FatalIOError);
}
else if (putBack_)
{
FatalIOErrorIn("void Istream::putBack(const token&)", *this)
FatalIOErrorInFunction(*this)
<< "Attempt to put back another token"
<< exit(FatalIOError);
}
@ -53,7 +53,7 @@ bool Foam::Istream::getBack(token& t)
{
if (bad())
{
FatalIOErrorIn("void Istream::getBack(token&)", *this)
FatalIOErrorInFunction(*this)
<< "Attempt to get back from bad stream"
<< exit(FatalIOError);
}
@ -91,7 +91,7 @@ Foam::Istream& Foam::Istream::readBegin(const char* funcName)
if (delimiter != token::BEGIN_LIST)
{
setBad();
FatalIOErrorIn("Istream::readBegin(const char*)", *this)
FatalIOErrorInFunction(*this)
<< "Expected a '" << token::BEGIN_LIST
<< "' while reading " << funcName
<< ", found " << delimiter.info()
@ -108,7 +108,7 @@ Foam::Istream& Foam::Istream::readEnd(const char* funcName)
if (delimiter != token::END_LIST)
{
setBad();
FatalIOErrorIn("Istream::readEnd(const char*)", *this)
FatalIOErrorInFunction(*this)
<< "Expected a '" << token::END_LIST
<< "' while reading " << funcName
<< ", found " << delimiter.info()
@ -135,7 +135,7 @@ char Foam::Istream::readBeginList(const char* funcName)
if (delimiter != token::BEGIN_LIST && delimiter != token::BEGIN_BLOCK)
{
setBad();
FatalIOErrorIn("Istream::readBeginList(const char*)", *this)
FatalIOErrorInFunction(*this)
<< "Expected a '" << token::BEGIN_LIST
<< "' or a '" << token::BEGIN_BLOCK
<< "' while reading " << funcName
@ -156,7 +156,7 @@ char Foam::Istream::readEndList(const char* funcName)
if (delimiter != token::END_LIST && delimiter != token::END_BLOCK)
{
setBad();
FatalIOErrorIn("Istream::readEndList(const char*)", *this)
FatalIOErrorInFunction(*this)
<< "Expected a '" << token::END_LIST
<< "' or a '" << token::END_BLOCK
<< "' while reading " << funcName

View File

@ -321,7 +321,7 @@ Foam::Istream& Foam::ISstream::read(token& t)
// runaway argument - avoid buffer overflow
buf[maxLen-1] = '\0';
FatalIOErrorIn("ISstream::read(token&)", *this)
FatalIOErrorInFunction(*this)
<< "number '" << buf << "...'\n"
<< " is too long (max. " << maxLen << " characters)"
<< exit(FatalIOError);
@ -440,7 +440,7 @@ Foam::Istream& Foam::ISstream::read(word& str)
{
buf[errLen] = '\0';
FatalIOErrorIn("ISstream::read(word&)", *this)
FatalIOErrorInFunction(*this)
<< "word '" << buf << "...'\n"
<< " is too long (max. " << maxLen << " characters)"
<< exit(FatalIOError);
@ -454,7 +454,7 @@ Foam::Istream& Foam::ISstream::read(word& str)
{
buf[errLen] = buf[nChar] = '\0';
FatalIOErrorIn("ISstream::read(word&)", *this)
FatalIOErrorInFunction(*this)
<< "problem while reading word '" << buf << "...' after "
<< nChar << " characters\n"
<< exit(FatalIOError);
@ -464,7 +464,7 @@ Foam::Istream& Foam::ISstream::read(word& str)
if (nChar == 0)
{
FatalIOErrorIn("ISstream::read(word&)", *this)
FatalIOErrorInFunction(*this)
<< "invalid first character found : " << c
<< exit(FatalIOError);
}
@ -488,7 +488,7 @@ Foam::Istream& Foam::ISstream::read(string& str)
if (!get(c))
{
FatalIOErrorIn("ISstream::read(string&)", *this)
FatalIOErrorInFunction(*this)
<< "cannot read start of string"
<< exit(FatalIOError);
@ -498,7 +498,7 @@ Foam::Istream& Foam::ISstream::read(string& str)
// Note, we could also handle single-quoted strings here (if desired)
if (c != token::BEGIN_STRING)
{
FatalIOErrorIn("ISstream::read(string&)", *this)
FatalIOErrorInFunction(*this)
<< "Incorrect start of string character found : " << c
<< exit(FatalIOError);
@ -536,7 +536,7 @@ Foam::Istream& Foam::ISstream::read(string& str)
{
buf[errLen] = buf[nChar] = '\0';
FatalIOErrorIn("ISstream::read(string&)", *this)
FatalIOErrorInFunction(*this)
<< "found '\\n' while reading string \""
<< buf << "...\""
<< exit(FatalIOError);
@ -558,7 +558,7 @@ Foam::Istream& Foam::ISstream::read(string& str)
{
buf[errLen] = '\0';
FatalIOErrorIn("ISstream::read(string&)", *this)
FatalIOErrorInFunction(*this)
<< "string \"" << buf << "...\"\n"
<< " is too long (max. " << maxLen << " characters)"
<< exit(FatalIOError);
@ -571,7 +571,7 @@ Foam::Istream& Foam::ISstream::read(string& str)
// don't worry about a dangling backslash if string terminated prematurely
buf[errLen] = buf[nChar] = '\0';
FatalIOErrorIn("ISstream::read(string&)", *this)
FatalIOErrorInFunction(*this)
<< "problem while reading string \"" << buf << "...\""
<< exit(FatalIOError);
@ -592,7 +592,7 @@ Foam::Istream& Foam::ISstream::readVariable(string& str)
if (!get(c) || c != '$')
{
FatalIOErrorIn("ISstream::readVariable(string&)", *this)
FatalIOErrorInFunction(*this)
<< "invalid first character found : " << c
<< exit(FatalIOError);
}
@ -620,7 +620,7 @@ Foam::Istream& Foam::ISstream::readVariable(string& str)
{
buf[errLen] = '\0';
FatalIOErrorIn("ISstream::readVariable(string&)", *this)
FatalIOErrorInFunction(*this)
<< "word '" << buf << "...'\n"
<< " is too long (max. " << maxLen << " characters)"
<< exit(FatalIOError);
@ -656,7 +656,7 @@ Foam::Istream& Foam::ISstream::readVariable(string& str)
{
buf[errLen] = '\0';
FatalIOErrorIn("ISstream::readVariable(string&)", *this)
FatalIOErrorInFunction(*this)
<< "word '" << buf << "...'\n"
<< " is too long (max. " << maxLen << " characters)"
<< exit(FatalIOError);
@ -671,7 +671,7 @@ Foam::Istream& Foam::ISstream::readVariable(string& str)
{
buf[errLen] = buf[nChar] = '\0';
FatalIOErrorIn("ISstream::readVariable(string&)", *this)
FatalIOErrorInFunction(*this)
<< "problem while reading string '" << buf << "...' after "
<< nChar << " characters\n"
<< exit(FatalIOError);
@ -681,7 +681,7 @@ Foam::Istream& Foam::ISstream::readVariable(string& str)
if (nChar == 0)
{
FatalIOErrorIn("ISstream::readVariable(string&)", *this)
FatalIOErrorInFunction(*this)
<< "invalid first character found : " << c
<< exit(FatalIOError);
}
@ -733,7 +733,7 @@ Foam::Istream& Foam::ISstream::readVerbatim(string& str)
{
buf[errLen] = '\0';
FatalIOErrorIn("ISstream::readVerbatim(string&)", *this)
FatalIOErrorInFunction(*this)
<< "string \"" << buf << "...\"\n"
<< " is too long (max. " << maxLen << " characters)"
<< exit(FatalIOError);
@ -746,7 +746,7 @@ Foam::Istream& Foam::ISstream::readVerbatim(string& str)
// don't worry about a dangling backslash if string terminated prematurely
buf[errLen] = buf[nChar] = '\0';
FatalIOErrorIn("ISstream::readVerbatim(string&)", *this)
FatalIOErrorInFunction(*this)
<< "problem while reading string \"" << buf << "...\""
<< exit(FatalIOError);
@ -783,7 +783,7 @@ Foam::Istream& Foam::ISstream::read(char* buf, std::streamsize count)
{
if (format() != BINARY)
{
FatalIOErrorIn("ISstream::read(char*, std::streamsize)", *this)
FatalIOErrorInFunction(*this)
<< "stream format not binary"
<< exit(FatalIOError);
}

View File

@ -219,7 +219,7 @@ Foam::Ostream& Foam::OSstream::write(const char* buf, std::streamsize count)
{
if (format() != BINARY)
{
FatalIOErrorIn("Ostream::write(const char*, std::streamsize)", *this)
FatalIOErrorInFunction(*this)
<< "stream format not binary"
<< abort(FatalIOError);
}

View File

@ -52,7 +52,7 @@ T Foam::ReadHex(ISstream& is)
if (!isxdigit(c))
{
FatalIOErrorIn("ReadHex(ISstream&)", is)
FatalIOErrorInFunction(is)
<< "Illegal hex digit: '" << c << "'"
<< exit(FatalIOError);
}

View File

@ -76,9 +76,8 @@ Foam::Istream& Foam::ITstream::read(token& t)
{
if (eof())
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"ITstream::read(token&)",
*this
) << "attempt to read beyond EOF"
<< exit(FatalIOError);

View File

@ -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
@ -67,7 +67,7 @@ Foam::autoPtr<Foam::token::compound> Foam::token::compound::New
if (cstrIter == IstreamConstructorTablePtr_->end())
{
FatalIOErrorIn("token::compound::New(const word&, Istream&)", is)
FatalIOErrorInFunction(is)
<< "Unknown compound type " << compoundType << nl << nl
<< "Valid compound types:" << endl
<< IstreamConstructorTablePtr_->sortedToc()
@ -96,11 +96,8 @@ Foam::token::compound& Foam::token::transferCompoundToken(const Istream& is)
{
if (compoundTokenPtr_->empty())
{
FatalIOErrorIn
(
"token::transferCompoundToken(const Istream& is)",
is
) << "compound has already been transfered from token\n "
FatalIOErrorInFunction(is)
<< "compound has already been transfered from token\n "
<< info() << abort(FatalIOError);
}
else

View File

@ -54,7 +54,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const token& t)
{
case token::UNDEFINED:
os << "UNDEFINED";
WarningIn("Ostream& operator<<(Ostream&, const token&)")
WarningInFunction
<< "Undefined token" << endl;
break;
@ -94,13 +94,13 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const token& t)
case token::ERROR:
os << "ERROR";
WarningIn("Ostream& operator<<(Ostream&, const token&)")
WarningInFunction
<< "Error token" << endl;
break;
default:
os << "UNKNOWN";
SeriousErrorIn("Ostream& operator<<(Ostream&, const token&)")
SeriousErrorInFunction
<< "Unknown token"
<< endl;
}

View File

@ -178,7 +178,7 @@ void Foam::Time::setControls()
}
else
{
FatalIOErrorIn("Time::setControls()", controlDict_)
FatalIOErrorInFunction(controlDict_)
<< "expected startTime, firstTime or latestTime"
<< " found '" << startFrom << "'"
<< exit(FatalIOError);
@ -225,7 +225,7 @@ void Foam::Time::setControls()
// Update the time formatting
setTime(startTime_, 0);
WarningIn("Time::setControls()")
WarningInFunction
<< "Increasing the timePrecision from " << oldPrecision
<< " to " << precision_
<< " to support the formatting of the current time directory "
@ -251,7 +251,7 @@ void Foam::Time::setControls()
> Pstream::nProcs()*deltaT_/10.0
)
{
FatalIOErrorIn("Time::setControls()", controlDict_)
FatalIOErrorInFunction(controlDict_)
<< "Start time is not the same for all processors" << nl
<< "processor " << Pstream::myProcNo() << " has startTime "
<< startTime_ << exit(FatalIOError);
@ -318,7 +318,7 @@ void Foam::Time::setControls()
if (storedTimeName != timeName())
{
IOWarningIn("Time::setControls()", timeDict)
IOWarningInFunction(timeDict)
<< "Time read from time dictionary " << storedTimeName
<< " differs from actual time " << timeName() << '.' << nl
<< " This may cause unexpected database behaviour."
@ -1308,7 +1308,7 @@ Foam::Time& Foam::Time::operator++()
if (precision_ != oldPrecision)
{
WarningIn("Time::operator++()")
WarningInFunction
<< "Increased the timePrecision from " << oldPrecision
<< " to " << precision_
<< " to distinguish between timeNames at time "
@ -1318,7 +1318,7 @@ Foam::Time& Foam::Time::operator++()
if (precision_ == maxPrecision_)
{
// Reached maxPrecision limit
WarningIn("Time::operator++()")
WarningInFunction
<< "Current time name " << dimensionedScalar::name()
<< nl
<< " The maximum time precision has been reached"
@ -1338,7 +1338,7 @@ Foam::Time& Foam::Time::operator++()
)
)
{
WarningIn("Time::operator++()")
WarningInFunction
<< "Current time name " << dimensionedScalar::name()
<< " is set to an instance prior to the "
"previous one "

View File

@ -213,7 +213,7 @@ void Foam::Time::readDict()
{
if (writeControl_ == wcTimeStep && label(writeInterval_) < 1)
{
FatalIOErrorIn("Time::readDict()", controlDict_)
FatalIOErrorInFunction(controlDict_)
<< "writeInterval < 1 for writeControl timeStep"
<< exit(FatalIOError);
}
@ -247,7 +247,7 @@ void Foam::Time::readDict()
&& label(secondaryWriteInterval_) < 1
)
{
FatalIOErrorIn("Time::readDict()", controlDict_)
FatalIOErrorInFunction(controlDict_)
<< "secondaryWriteInterval < 1"
<< " for secondaryWriteControl timeStep"
<< exit(FatalIOError);
@ -307,7 +307,7 @@ void Foam::Time::readDict()
{
if (purgeWrite_ < 0)
{
WarningIn("Time::readDict()")
WarningInFunction
<< "invalid value for purgeWrite " << purgeWrite_
<< ", should be >= 0, setting to 0"
<< endl;
@ -320,7 +320,7 @@ void Foam::Time::readDict()
{
if (secondaryPurgeWrite_ < 0)
{
WarningIn("Time::readDict()")
WarningInFunction
<< "invalid value for secondaryPurgeWrite "
<< secondaryPurgeWrite_
<< ", should be >= 0, setting to 0"
@ -348,7 +348,7 @@ void Foam::Time::readDict()
}
else
{
WarningIn("Time::readDict()")
WarningInFunction
<< "unsupported time format " << formatName
<< endl;
}

View File

@ -267,7 +267,7 @@ Foam::instantList Foam::timeSelector::select0
if (timeDirs.empty())
{
WarningIn(args.executable())
WarningInFunction
<< "No time specified or available, selecting 'constant'"
<< endl;

View File

@ -435,9 +435,8 @@ const Foam::entry& Foam::dictionary::lookupEntry
if (entryPtr == NULL)
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"dictionary::lookupEntry(const word&, bool, bool) const",
*this
) << "keyword " << keyword << " is undefined in dictionary "
<< name()
@ -515,10 +514,8 @@ const Foam::entry* Foam::dictionary::lookupScopedEntryPtr
// Go to parent
if (&dictPtr->parent_ == &dictionary::null)
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"dictionary::lookupScopedEntryPtr"
"(const word&, bool, bool)",
*this
) << "No parent of current dictionary"
<< " when searching for "
@ -549,10 +546,8 @@ const Foam::entry* Foam::dictionary::lookupScopedEntryPtr
if (!entPtr)
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"dictionary::lookupScopedEntryPtr"
"(const word&, bool, bool)",
*this
) << "keyword " << firstWord
<< " is undefined in dictionary "
@ -641,9 +636,8 @@ const Foam::dictionary& Foam::dictionary::subDict(const word& keyword) const
if (entryPtr == NULL)
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"dictionary::subDict(const word& keyword) const",
*this
) << "keyword " << keyword << " is undefined in dictionary "
<< name()
@ -659,9 +653,8 @@ Foam::dictionary& Foam::dictionary::subDict(const word& keyword)
if (entryPtr == NULL)
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"dictionary::subDict(const word& keyword)",
*this
) << "keyword " << keyword << " is undefined in dictionary "
<< name()
@ -683,9 +676,8 @@ Foam::dictionary Foam::dictionary::subOrEmptyDict
{
if (mustRead)
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"dictionary::subOrEmptyDict(const word& keyword, const bool)",
*this
) << "keyword " << keyword << " is undefined in dictionary "
<< name()
@ -777,7 +769,7 @@ bool Foam::dictionary::add(entry* entryPtr, bool mergeEntry)
}
else
{
IOWarningIn("dictionary::add(entry*, bool)", (*this))
IOWarningInFunction((*this))
<< "problem replacing entry "<< entryPtr->keyword()
<< " in dictionary " << name() << endl;
@ -806,7 +798,7 @@ bool Foam::dictionary::add(entry* entryPtr, bool mergeEntry)
}
else
{
IOWarningIn("dictionary::add(entry*, bool)", (*this))
IOWarningInFunction((*this))
<< "attempt to add entry "<< entryPtr->keyword()
<< " which already exists in dictionary " << name()
<< endl;
@ -943,9 +935,8 @@ bool Foam::dictionary::changeKeyword
if (iter()->keyword().isPattern())
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"dictionary::changeKeyword(const word&, const word&, bool)",
*this
) << "Old keyword "<< oldKeyword
<< " is a pattern."
@ -984,9 +975,8 @@ bool Foam::dictionary::changeKeyword
}
else
{
IOWarningIn
IOWarningInFunction
(
"dictionary::changeKeyword(const word&, const word&, bool)",
*this
) << "cannot rename keyword "<< oldKeyword
<< " to existing keyword " << newKeyword
@ -1019,7 +1009,7 @@ bool Foam::dictionary::merge(const dictionary& dict)
// Check for assignment to self
if (this == &dict)
{
FatalIOErrorIn("dictionary::merge(const dictionary&)", *this)
FatalIOErrorInFunction(*this)
<< "attempted merge to self for dictionary " << name()
<< abort(FatalIOError);
}
@ -1100,7 +1090,7 @@ void Foam::dictionary::operator=(const dictionary& rhs)
// Check for assignment to self
if (this == &rhs)
{
FatalIOErrorIn("dictionary::operator=(const dictionary&)", *this)
FatalIOErrorInFunction(*this)
<< "attempted assignment to self for dictionary " << name()
<< abort(FatalIOError);
}
@ -1123,7 +1113,7 @@ void Foam::dictionary::operator+=(const dictionary& rhs)
// Check for assignment to self
if (this == &rhs)
{
FatalIOErrorIn("dictionary::operator+=(const dictionary&)", *this)
FatalIOErrorInFunction(*this)
<< "attempted addition assignment to self for dictionary " << name()
<< abort(FatalIOError);
}
@ -1140,7 +1130,7 @@ void Foam::dictionary::operator|=(const dictionary& rhs)
// Check for assignment to self
if (this == &rhs)
{
FatalIOErrorIn("dictionary::operator|=(const dictionary&)", *this)
FatalIOErrorInFunction(*this)
<< "attempted assignment to self for dictionary " << name()
<< abort(FatalIOError);
}
@ -1160,7 +1150,7 @@ void Foam::dictionary::operator<<=(const dictionary& rhs)
// Check for assignment to self
if (this == &rhs)
{
FatalIOErrorIn("dictionary::operator<<=(const dictionary&)", *this)
FatalIOErrorInFunction(*this)
<< "attempted assignment to self for dictionary " << name()
<< abort(FatalIOError);
}

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
@ -80,7 +80,7 @@ Foam::label Foam::dictionaryEntry::endLineNumber() const
Foam::ITstream& Foam::dictionaryEntry::stream() const
{
FatalIOErrorIn("ITstream& primitiveEntry::stream() const", *this)
FatalIOErrorInFunction(*this)
<< "Attempt to return dictionary entry as a primitive"
<< abort(FatalIOError);

View File

@ -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
@ -88,7 +88,7 @@ bool Foam::dictionary::read(Istream& is, const bool keepHeader)
if (!is.good())
{
FatalIOErrorIn("dictionary::read(Istream&, bool)", is)
FatalIOErrorInFunction(is)
<< "Istream not OK for reading dictionary "
<< exit(FatalIOError);
@ -193,7 +193,7 @@ void Foam::dictionary::write(Ostream& os, bool subDict) const
// Check stream before going to next entry.
if (!os.good())
{
WarningIn("dictionary::write(Ostream&, bool subDict)")
WarningInFunction
<< "Can't write entry " << iter().keyword()
<< " for dictionary " << name()
<< endl;

View File

@ -47,7 +47,7 @@ T Foam::dictionary::lookupOrDefault
{
if (writeOptionalEntries)
{
IOInfoIn("dictionary::lookupOrDefault", *this)
IOInfoInFunction(*this)
<< "Optional entry '" << keyword << "' is not present,"
<< " returning the default value '" << deflt << "'"
<< endl;
@ -77,7 +77,7 @@ T Foam::dictionary::lookupOrAddDefault
{
if (writeOptionalEntries)
{
IOInfoIn("dictionary::lookupOrAddDefault", *this)
IOInfoInFunction(*this)
<< "Optional entry '" << keyword << "' is not present,"
<< " adding and returning the default value '" << deflt << "'"
<< endl;
@ -109,7 +109,7 @@ bool Foam::dictionary::readIfPresent
{
if (writeOptionalEntries)
{
IOInfoIn("dictionary::readIfPresent", *this)
IOInfoInFunction(*this)
<< "Optional entry '" << keyword << "' is not present,"
<< " the default value '" << val << "' will be used."
<< endl;

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
@ -156,11 +156,7 @@ bool Foam::entry::New(dictionary& parentDict, Istream& is)
}
else
{
FatalIOErrorIn
(
"entry::New(const dictionary& parentDict, Istream&)",
is
)
FatalIOErrorInFunction(is)
<< "Attempt to use undefined variable " << varName
<< " as keyword"
<< exit(FatalIOError);
@ -228,11 +224,7 @@ bool Foam::entry::New(dictionary& parentDict, Istream& is)
}
else if (functionEntries::inputModeEntry::error())
{
FatalIOErrorIn
(
"entry::New(const dictionary& parentDict, Istream&)",
is
)
FatalIOErrorInFunction(is)
<< "ERROR! duplicate entry: " << keyword
<< exit(FatalIOError);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -158,9 +158,8 @@ Foam::functionEntries::codeStream::getFunction
if (!dynCode.copyOrCreateFiles(true))
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"functionEntries::codeStream::execute(..)",
parentDict
) << "Failed writing files for" << nl
<< dynCode.libRelPath() << nl
@ -170,9 +169,8 @@ Foam::functionEntries::codeStream::getFunction
if (!dynCode.wmakeLibso())
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"functionEntries::codeStream::execute(..)",
parentDict
) << "Failed wmake " << dynCode.libRelPath() << nl
<< exit(FatalIOError);
@ -223,9 +221,8 @@ Foam::functionEntries::codeStream::getFunction
if (mySize < masterSize)
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"functionEntries::codeStream::execute(..)",
parentDict
) << "Cannot read (NFS mounted) library " << nl
<< libPath << nl
@ -262,9 +259,8 @@ Foam::functionEntries::codeStream::getFunction
if (!dlLibs.open(libPath, false))
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"functionEntries::codeStream::execute(..)",
parentDict
) << "Failed loading library " << libPath << nl
<< "Did you add all libraries to the 'libs' entry"
@ -293,9 +289,8 @@ Foam::functionEntries::codeStream::getFunction
if (!haveLib)
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"functionEntries::codeStream::execute(..)",
parentDict
) << "Failed loading library " << libPath
<< " on some processors."
@ -313,9 +308,8 @@ Foam::functionEntries::codeStream::getFunction
if (!function)
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"functionEntries::codeStream::execute(..)",
parentDict
) << "Failed looking up symbol " << dynCode.codeName()
<< " in library " << lib << exit(FatalIOError);

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
@ -140,10 +140,8 @@ bool Foam::functionEntries::includeEntry::execute
}
else
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"functionEntries::includeEntry::includeEntry"
"(dictionary& parentDict, Istream&)",
is
) << "Cannot open include file "
<< (ifs.name().size() ? ifs.name() : rawFName)
@ -180,10 +178,8 @@ bool Foam::functionEntries::includeEntry::execute
}
else
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"functionEntries::includeEntry::includeEntry"
"(dictionary& parentDict, primitiveEntry&, Istream&)",
is
) << "Cannot open include file "
<< (ifs.name().size() ? ifs.name() : rawFName)

View File

@ -118,10 +118,8 @@ bool Foam::functionEntries::includeEtcEntry::execute
}
else
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"functionEntries::includeEtcEntry::includeEtcEntry"
"(dictionary& parentDict, Istream&)",
is
) << "Cannot open etc file "
<< (ifs.name().size() ? ifs.name() : rawFName)
@ -158,10 +156,8 @@ bool Foam::functionEntries::includeEtcEntry::execute
}
else
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"functionEntries::includeEtcEntry::includeEtcEntry"
"(dictionary& parentDict, primitiveEntry&, Istream&)",
is
) << "Cannot open etc file "
<< (ifs.name().size() ? ifs.name() : rawFName)

View File

@ -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
@ -85,7 +85,7 @@ void Foam::functionEntries::inputModeEntry::setMode(Istream& is)
}
else
{
WarningIn("Foam::functionEntries::inputModeEntry::setMode(Istream&)")
WarningInFunction
<< "unsupported input mode '" << mode
<< "' ... defaulting to 'merge'"
<< endl;

View File

@ -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
@ -182,9 +182,8 @@ void Foam::primitiveEntry::readEntry(const dictionary& dict, Istream& is)
<< " on line " << keywordLineNumber
<< " and ending at line " << is.lineNumber();
SafeFatalIOErrorIn
SafeFatalIOErrorInFunction
(
"primitiveEntry::readEntry(const dictionary&, Istream&)",
is,
os.str()
);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -76,9 +76,8 @@ void* Foam::codedBase::loadLibrary
}
else
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"codedBase::updateLibrary()",
contextDict
) << "Failed looking up symbol " << globalFuncName
<< nl << "from " << libPath << exit(FatalIOError);
@ -86,9 +85,8 @@ void* Foam::codedBase::loadLibrary
}
else
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"codedBase::loadLibrary()",
contextDict
) << "Failed looking up symbol " << globalFuncName << nl
<< "from " << libPath << exit(FatalIOError);
@ -96,9 +94,8 @@ void* Foam::codedBase::loadLibrary
lib = 0;
if (!libs().close(libPath, false))
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"codedBase::loadLibrary()",
contextDict
) << "Failed unloading library "
<< libPath
@ -149,9 +146,8 @@ void Foam::codedBase::unloadLibrary
}
else
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"codedBase::unloadLibrary()",
contextDict
) << "Failed looking up symbol " << globalFuncName << nl
<< "from " << libPath << exit(FatalIOError);
@ -160,9 +156,8 @@ void Foam::codedBase::unloadLibrary
if (!libs().close(libPath, false))
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"codedBase::updateLibrary()",
contextDict
) << "Failed unloading library " << libPath
<< exit(FatalIOError);
@ -194,9 +189,8 @@ void Foam::codedBase::createLibrary
if (!dynCode.copyOrCreateFiles(true))
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"codedBase::createLibrary(..)",
context.dict()
) << "Failed writing files for" << nl
<< dynCode.libRelPath() << nl
@ -206,9 +200,8 @@ void Foam::codedBase::createLibrary
if (!dynCode.wmakeLibso())
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"codedBase::createLibrary(..)",
context.dict()
) << "Failed wmake " << dynCode.libRelPath() << nl
<< exit(FatalIOError);
@ -257,9 +250,8 @@ void Foam::codedBase::createLibrary
if (mySize < masterSize)
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"functionEntries::codeStream::execute(..)",
context.dict()
) << "Cannot read (NFS mounted) library " << nl
<< libPath << nl

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -93,10 +93,8 @@ bool Foam::dlLibraryTable::open
{
if (verbose)
{
WarningIn
(
"dlLibraryTable::open(const fileName&, const bool)"
) << "could not load " << functionLibName
WarningInFunction
<< "could not load " << functionLibName
<< endl;
}
@ -149,10 +147,8 @@ bool Foam::dlLibraryTable::close
{
if (verbose)
{
WarningIn
(
"dlLibraryTable::close(const fileName&)"
) << "could not close " << functionLibName
WarningInFunction
<< "could not close " << functionLibName
<< endl;
}

View File

@ -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
@ -59,22 +59,14 @@ bool Foam::dlLibraryTable::open
if (!opened)
{
WarningIn
(
"dlLibraryTable::open"
"(const dictionary&, const word&, "
"const TablePtr&)"
) << "Could not open library " << libName
WarningInFunction
<< "Could not open library " << libName
<< endl << endl;
}
else if (debug && (!tablePtr || tablePtr->size() <= nEntries))
{
WarningIn
(
"dlLibraryTable::open"
"(const dictionary&, const word&, "
"const TablePtr&)"
) << "library " << libName
WarningInFunction
<< "library " << libName
<< " did not introduce any new entries"
<< endl << endl;
}

View File

@ -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
@ -125,9 +125,8 @@ void Foam::IOerror::SafeFatalIOError
{
if (JobInfo::constructed)
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"primitiveEntry::readEntry(const dictionary&, Istream&)",
ioStream
) << msg << Foam::exit(FatalIOError);
}

View File

@ -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
@ -185,7 +185,7 @@ Foam::label Foam::objectRegistry::getEvent() const
{
if (objectRegistry::debug)
{
WarningIn("objectRegistry::getEvent() const")
WarningInFunction
<< "Event counter has overflowed. "
<< "Resetting counter on all dependent objects." << nl
<< "This might cause extra evaluations." << endl;
@ -246,7 +246,7 @@ bool Foam::objectRegistry::checkOut(regIOobject& io) const
{
if (objectRegistry::debug)
{
WarningIn("objectRegistry::checkOut(regIOobject&)")
WarningInFunction
<< name() << " : attempt to checkOut copy of "
<< iter.key()
<< endl;

View File

@ -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
@ -42,7 +42,7 @@ bool Foam::regIOobject::writeObject
{
if (!good())
{
SeriousErrorIn("regIOobject::write()")
SeriousErrorInFunction
<< "bad object " << name()
<< endl;
@ -51,7 +51,7 @@ bool Foam::regIOobject::writeObject
if (instance().empty())
{
SeriousErrorIn("regIOobject::write()")
SeriousErrorInFunction
<< "instance undefined for object " << name()
<< endl;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -292,11 +292,8 @@ Foam::dimensionedScalar Foam::dimensionSet::parse
token t = tis.nextToken();
if (!t.isPunctuation() || t.pToken() != token::END_LIST)
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"dimensionSet::parse"
"(const label, tokeniser&"
", const HashTable<dimensionedScalar>&)",
tis.stream()
) << "Illegal token " << t << exit(FatalIOError);
}
@ -364,22 +361,16 @@ Foam::dimensionedScalar Foam::dimensionSet::parse
}
else
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"dimensionSet::parse"
"(const label, tokeniser&"
", const HashTable<dimensionedScalar>&)",
tis.stream()
) << "Illegal token " << nextToken << exit(FatalIOError);
}
}
else
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"dimensionSet::parse"
"(const label, tokeniser&"
", const HashTable<dimensionedScalar>&)",
tis.stream()
) << "Illegal token " << nextToken << exit(FatalIOError);
}
@ -422,10 +413,8 @@ Foam::Istream& Foam::dimensionSet::read
if (startToken != token::BEGIN_SQR)
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"dimensionSet::read"
"(Istream&, scalar&, const HashTable<dimensionedScalar>&)",
is
) << "expected a " << token::BEGIN_SQR << " in dimensionSet"
<< endl << "in stream " << is.info()
@ -480,10 +469,8 @@ Foam::Istream& Foam::dimensionSet::read
// Check end of dimensionSet
if (nextToken != token::END_SQR)
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"dimensionSet::read"
"(Istream&, scalar&, const HashTable<dimensionedScalar>&)",
is
) << "expected a " << token::END_SQR << " in dimensionSet "
<< endl << "in stream " << is.info()
@ -521,10 +508,8 @@ Foam::Istream& Foam::dimensionSet::read
if (startToken != token::BEGIN_SQR)
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"dimensionSet::read"
"(Istream&, scalar&, const dictionary&)",
is
) << "expected a " << token::BEGIN_SQR << " in dimensionSet"
<< endl << "in stream " << is.info()
@ -623,10 +608,8 @@ Foam::Istream& Foam::dimensionSet::read
// Check end of dimensionSet
if (nextToken != token::END_SQR)
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"dimensionSet::read"
"(Istream&, scalar&, const dictionary&)",
is
) << "expected a " << token::END_SQR << " in dimensionSet "
<< endl << "in stream " << is.info()
@ -734,7 +717,7 @@ Foam::Istream& Foam::operator>>(Istream& is, dimensionSet& dset)
if (mag(multiplier-1.0) > dimensionSet::smallExponent)
{
FatalIOErrorIn("Foam::operator>>(Istream&, dimensionSet&)", is)
FatalIOErrorInFunction(is)
<< "Cannot use scaled units in dimensionSet"
<< exit(FatalIOError);
}

View File

@ -102,7 +102,7 @@ const HashTable<dimensionedScalar>& unitSet()
if (!dict.found("unitSet"))
{
FatalIOErrorIn("unitSet()", dict)
FatalIOErrorInFunction(dict)
<< "Cannot find unitSet in dictionary " << dict.name()
<< exit(FatalIOError);
}
@ -111,7 +111,7 @@ const HashTable<dimensionedScalar>& unitSet()
if (!dict.found(unitSetCoeffs))
{
FatalIOErrorIn("unitSet()", dict)
FatalIOErrorInFunction(dict)
<< "Cannot find " << unitSetCoeffs << " in dictionary "
<< dict.name() << exit(FatalIOError);
}
@ -129,7 +129,7 @@ const HashTable<dimensionedScalar>& unitSet()
bool ok = unitSetPtr_->insert(iter().keyword(), dt);
if (!ok)
{
FatalIOErrorIn("unitSet()", dict)
FatalIOErrorInFunction(dict)
<< "Duplicate unit " << iter().keyword()
<< " in DimensionSets dictionary"
<< exit(FatalIOError);
@ -150,7 +150,7 @@ const HashTable<dimensionedScalar>& unitSet()
if (writeUnitNames.size() != 0 && writeUnitNames.size() != 7)
{
FatalIOErrorIn("unitSet()", dict)
FatalIOErrorInFunction(dict)
<< "Cannot find entry \"writeUnits\" in " << unitDict.name()
<< " or it is not a wordList of size 7"
<< exit(FatalIOError);

View File

@ -524,7 +524,7 @@ Type average(const FieldField<Field, Type>& f)
if (n == 0)
{
WarningIn("average(const FieldField<Field, Type>&) const")
WarningInFunction
<< "empty fieldField, returning zero" << endl;
return pTraits<Type>::zero;
@ -536,7 +536,7 @@ Type average(const FieldField<Field, Type>& f)
}
else
{
WarningIn("average(const FieldField<Field, Type>&) const")
WarningInFunction
<< "empty fieldField, returning zero" << endl;
return pTraits<Type>::zero;
@ -587,7 +587,7 @@ Type gAverage(const FieldField<Field, Type>& f)
}
else
{
WarningIn("gAverage(const FieldField<Field, Type>&) const")
WarningInFunction
<< "empty fieldField, returning zero" << endl;
return pTraits<Type>::zero;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -517,7 +517,7 @@ Type average(const UList<Type>& f)
}
else
{
WarningIn("average(const UList<Type>&)")
WarningInFunction
<< "empty field, returning zero" << endl;
return pTraits<Type>::zero;
@ -594,7 +594,7 @@ Type gAverage
}
else
{
WarningIn("gAverage(const UList<Type>&)")
WarningInFunction
<< "empty field, returning zero." << endl;
return pTraits<Type>::zero;

View File

@ -100,10 +100,8 @@ bool Foam::GeometricField<Type, PatchField, GeoMesh>::readIfPresent()
|| this->readOpt() == IOobject::MUST_READ_IF_MODIFIED
)
{
WarningIn
(
"GeometricField<Type, PatchField, GeoMesh>::readIfPresent()"
) << "read option IOobject::MUST_READ or MUST_READ_IF_MODIFIED"
WarningInFunction
<< "read option IOobject::MUST_READ or MUST_READ_IF_MODIFIED"
<< " suggests that a read constructor for field " << this->name()
<< " would be more appropriate." << endl;
}
@ -871,11 +869,8 @@ void Foam::GeometricField<Type, PatchField, GeoMesh>::relax(const scalar alpha)
{
if (debug)
{
InfoIn
(
"GeometricField<Type, PatchField, GeoMesh>::relax"
"(const scalar alpha)"
) << "Relaxing" << endl << this->info() << " by " << alpha << endl;
InfoInFunction
<< "Relaxing" << endl << this->info() << " by " << alpha << endl;
}
operator==(prevIter() + alpha*(*this - prevIter()));

View File

@ -99,9 +99,8 @@ Foam::dictionary& Foam::debug::controlDict()
if (!ifs.good())
{
SafeFatalIOErrorIn
SafeFatalIOErrorInFunction
(
"debug::controlDict()",
ifs,
"Cannot open controlDict"
);

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
@ -64,11 +64,8 @@ splineInterpolationWeights::splineInterpolationWeights
if (mag(d-interval) > SMALL)
{
WarningIn
(
"splineInterpolationWeights::splineInterpolationWeights"
"(const scalarField&)"
) << "Spline interpolation only valid for constant intervals."
WarningInFunction
<< "Spline interpolation only valid for constant intervals."
<< nl
<< "Interval 0-1 : " << interval << nl
<< "Interval " << i-1 << '-' << i << " : "

View File

@ -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,10 +44,8 @@ Foam::LduMatrix<Type, DType, LUType>::preconditioner::New
if (constructorIter == symMatrixConstructorTablePtr_->end())
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"LduMatrix<Type, DType, LUType>::preconditioner::New"
"(const solver&, Istream&)",
preconditionerDict
) << "Unknown symmetric matrix preconditioner "
<< preconditionerName << endl << endl
@ -72,10 +70,8 @@ Foam::LduMatrix<Type, DType, LUType>::preconditioner::New
if (constructorIter == asymMatrixConstructorTablePtr_->end())
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"LduMatrix<Type, DType, LUType>::preconditioner::New"
"(const solver&, Istream&)",
preconditionerDict
) << "Unknown asymmetric matrix preconditioner "
<< preconditionerName << endl << endl
@ -95,10 +91,8 @@ Foam::LduMatrix<Type, DType, LUType>::preconditioner::New
}
else
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"LduMatrix<Type, DType, LUType>::preconditioner::New"
"(const solver&, Istream&)",
preconditionerDict
) << "cannot preconditione incomplete matrix, "
"no diagonal or off-diagonal coefficient"

View File

@ -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
@ -45,10 +45,8 @@ Foam::LduMatrix<Type, DType, LUType>::smoother::New
if (constructorIter == symMatrixConstructorTablePtr_->end())
{
FatalIOErrorIn
(
"LduMatrix<Type, DType, LUType>::smoother::New", smootherDict
) << "Unknown symmetric matrix smoother " << smootherName
FatalIOErrorInFunction(smootherDict)
<< "Unknown symmetric matrix smoother " << smootherName
<< endl << endl
<< "Valid symmetric matrix smoothers are :" << endl
<< symMatrixConstructorTablePtr_->toc()
@ -71,10 +69,8 @@ Foam::LduMatrix<Type, DType, LUType>::smoother::New
if (constructorIter == asymMatrixConstructorTablePtr_->end())
{
FatalIOErrorIn
(
"LduMatrix<Type, DType, LUType>::smoother::New", smootherDict
) << "Unknown asymmetric matrix smoother " << smootherName
FatalIOErrorInFunction(smootherDict)
<< "Unknown asymmetric matrix smoother " << smootherName
<< endl << endl
<< "Valid asymmetric matrix smoothers are :" << endl
<< asymMatrixConstructorTablePtr_->toc()
@ -92,10 +88,8 @@ Foam::LduMatrix<Type, DType, LUType>::smoother::New
}
else
{
FatalIOErrorIn
(
"LduMatrix<Type, DType, LUType>::smoother::New", smootherDict
) << "cannot solve incomplete matrix, no off-diagonal coefficients"
FatalIOErrorInFunction(smootherDict)
<< "cannot solve incomplete matrix, no off-diagonal coefficients"
<< exit(FatalIOError);
return autoPtr<typename LduMatrix<Type, DType, LUType>::smoother>(NULL);

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
@ -58,10 +58,8 @@ Foam::LduMatrix<Type, DType, LUType>::solver::New
if (constructorIter == symMatrixConstructorTablePtr_->end())
{
FatalIOErrorIn
(
"LduMatrix<Type, DType, LUType>::solver::New", solverDict
) << "Unknown symmetric matrix solver " << solverName
FatalIOErrorInFunction(solverDict)
<< "Unknown symmetric matrix solver " << solverName
<< endl << endl
<< "Valid symmetric matrix solvers are :" << endl
<< symMatrixConstructorTablePtr_->toc()
@ -85,10 +83,8 @@ Foam::LduMatrix<Type, DType, LUType>::solver::New
if (constructorIter == asymMatrixConstructorTablePtr_->end())
{
FatalIOErrorIn
(
"LduMatrix<Type, DType, LUType>::solver::New", solverDict
) << "Unknown asymmetric matrix solver " << solverName
FatalIOErrorInFunction(solverDict)
<< "Unknown asymmetric matrix solver " << solverName
<< endl << endl
<< "Valid asymmetric matrix solvers are :" << endl
<< asymMatrixConstructorTablePtr_->toc()
@ -107,10 +103,8 @@ Foam::LduMatrix<Type, DType, LUType>::solver::New
}
else
{
FatalIOErrorIn
(
"LduMatrix<Type, DType, LUType>::solver::New", solverDict
) << "cannot solve incomplete matrix, "
FatalIOErrorInFunction(solverDict)
<< "cannot solve incomplete matrix, "
"no diagonal or off-diagonal coefficient"
<< exit(FatalIOError);

View File

@ -138,7 +138,7 @@ Foam::Istream& Foam::operator>>(Istream& is, Matrix<Form, Type>& M)
}
else
{
FatalIOErrorIn("operator>>(Istream&, Matrix<Form, Type>&)", is)
FatalIOErrorInFunction(is)
<< "incorrect first token, expected <int>, found "
<< firstToken.info()
<< exit(FatalIOError);

View File

@ -204,7 +204,7 @@ void Foam::lduMatrix::operator+=(const lduMatrix& A)
{
if (debug > 1)
{
WarningIn("lduMatrix::operator+=(const lduMatrix& A)")
WarningInFunction
<< "Unknown matrix type combination" << nl
<< " this :"
<< " diagonal:" << diagonal()
@ -283,7 +283,7 @@ void Foam::lduMatrix::operator-=(const lduMatrix& A)
{
if (debug > 1)
{
WarningIn("lduMatrix::operator-=(const lduMatrix& A)")
WarningInFunction
<< "Unknown matrix type combination" << nl
<< " this :"
<< " diagonal:" << diagonal()

View File

@ -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
@ -87,10 +87,8 @@ Foam::lduMatrix::preconditioner::New
if (constructorIter == symMatrixConstructorTablePtr_->end())
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"lduMatrix::preconditioner::New"
"(const solver&, const dictionary&)",
controls
) << "Unknown symmetric matrix preconditioner "
<< name << nl << nl
@ -115,10 +113,8 @@ Foam::lduMatrix::preconditioner::New
if (constructorIter == asymMatrixConstructorTablePtr_->end())
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"lduMatrix::preconditioner::New"
"(const solver&, const dictionary&)",
controls
) << "Unknown asymmetric matrix preconditioner "
<< name << nl << nl
@ -138,10 +134,8 @@ Foam::lduMatrix::preconditioner::New
}
else
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"lduMatrix::preconditioner::New"
"(const solver&, const dictionary&)",
controls
) << "cannot solve incomplete matrix, "
"no diagonal or off-diagonal coefficient"

View File

@ -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
@ -91,10 +91,8 @@ Foam::autoPtr<Foam::lduMatrix::smoother> Foam::lduMatrix::smoother::New
if (constructorIter == symMatrixConstructorTablePtr_->end())
{
FatalIOErrorIn
(
"lduMatrix::smoother::New", solverControls
) << "Unknown symmetric matrix smoother "
FatalIOErrorInFunction(solverControls)
<< "Unknown symmetric matrix smoother "
<< name << nl << nl
<< "Valid symmetric matrix smoothers are :" << endl
<< symMatrixConstructorTablePtr_->sortedToc()
@ -120,10 +118,8 @@ Foam::autoPtr<Foam::lduMatrix::smoother> Foam::lduMatrix::smoother::New
if (constructorIter == asymMatrixConstructorTablePtr_->end())
{
FatalIOErrorIn
(
"lduMatrix::smoother::New", solverControls
) << "Unknown asymmetric matrix smoother "
FatalIOErrorInFunction(solverControls)
<< "Unknown asymmetric matrix smoother "
<< name << nl << nl
<< "Valid asymmetric matrix smoothers are :" << endl
<< asymMatrixConstructorTablePtr_->sortedToc()
@ -144,10 +140,8 @@ Foam::autoPtr<Foam::lduMatrix::smoother> Foam::lduMatrix::smoother::New
}
else
{
FatalIOErrorIn
(
"lduMatrix::smoother::New", solverControls
) << "cannot solve incomplete matrix, "
FatalIOErrorInFunction(solverControls)
<< "cannot solve incomplete matrix, "
"no diagonal or off-diagonal coefficient"
<< exit(FatalIOError);

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
@ -71,10 +71,8 @@ Foam::autoPtr<Foam::lduMatrix::solver> Foam::lduMatrix::solver::New
if (constructorIter == symMatrixConstructorTablePtr_->end())
{
FatalIOErrorIn
(
"lduMatrix::solver::New", solverControls
) << "Unknown symmetric matrix solver " << name << nl << nl
FatalIOErrorInFunction(solverControls)
<< "Unknown symmetric matrix solver " << name << nl << nl
<< "Valid symmetric matrix solvers are :" << endl
<< symMatrixConstructorTablePtr_->sortedToc()
<< exit(FatalIOError);
@ -100,10 +98,8 @@ Foam::autoPtr<Foam::lduMatrix::solver> Foam::lduMatrix::solver::New
if (constructorIter == asymMatrixConstructorTablePtr_->end())
{
FatalIOErrorIn
(
"lduMatrix::solver::New", solverControls
) << "Unknown asymmetric matrix solver " << name << nl << nl
FatalIOErrorInFunction(solverControls)
<< "Unknown asymmetric matrix solver " << name << nl << nl
<< "Valid asymmetric matrix solvers are :" << endl
<< asymMatrixConstructorTablePtr_->sortedToc()
<< exit(FatalIOError);
@ -124,10 +120,8 @@ Foam::autoPtr<Foam::lduMatrix::solver> Foam::lduMatrix::solver::New
}
else
{
FatalIOErrorIn
(
"lduMatrix::solver::New", solverControls
) << "cannot solve incomplete matrix, "
FatalIOErrorInFunction(solverControls)
<< "cannot solve incomplete matrix, "
"no diagonal or off-diagonal coefficient"
<< exit(FatalIOError);

View File

@ -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
@ -293,11 +293,8 @@ Foam::SVD::SVD(const scalarRectangularMatrix& A, const scalar minCondition)
}
if (its == 34)
{
WarningIn
(
"SVD::SVD"
"(scalarRectangularMatrix& A, const scalar minCondition)"
) << "no convergence in 35 SVD iterations"
WarningInFunction
<< "no convergence in 35 SVD iterations"
<< endl;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -306,9 +306,8 @@ Foam::scalar Foam::solution::fieldRelaxationFactor(const word& name) const
}
else
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"Foam::solution::fieldRelaxationFactor(const word&)",
fieldRelaxDict_
) << "Cannot find variable relaxation factor for '" << name
<< "' or a suitable default value."
@ -336,9 +335,8 @@ Foam::scalar Foam::solution::equationRelaxationFactor(const word& name) const
}
else
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"Foam::solution::eqnRelaxationFactor(const word&)",
eqnRelaxDict_
) << "Cannot find equation relaxation factor for '" << name
<< "' or a suitable default value."
@ -366,7 +364,7 @@ const Foam::dictionary& Foam::solution::solverDict(const word& name) const
{
if (debug)
{
InfoIn("solution::solverDict(const word&)")
InfoInFunction
<< "Lookup solver for " << name << endl;
}
@ -378,7 +376,7 @@ const Foam::dictionary& Foam::solution::solver(const word& name) const
{
if (debug)
{
InfoIn("solution::solver(const word&)")
InfoInFunction
<< "Lookup solver for " << name << endl;
}

View File

@ -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
@ -67,7 +67,7 @@ Foam::vector Foam::cellModel::centre
if (pyrVol > SMALL)
{
WarningIn("cellModel::centre(const labelList&, const pointField&)")
WarningInFunction
<< "zero or negative pyramid volume: " << -pyrVol
<< " for face " << i
<< endl;
@ -125,7 +125,7 @@ Foam::scalar Foam::cellModel::mag
if (pyrVol > SMALL)
{
WarningIn("cellModel::mag(const labelList&, const pointField&)")
WarningInFunction
<< "zero or negative pyramid volume: " << -pyrVol
<< " for face " << i
<< endl;

View File

@ -46,7 +46,7 @@ Foam::Istream& Foam::operator>>(Istream& is, cellShape& s)
}
else
{
FatalIOErrorIn("operator>>(Istream&, cellShape& s)", is)
FatalIOErrorInFunction(is)
<< "incorrect first token, expected '(', found "
<< t.info()
<< exit(FatalIOError);
@ -64,7 +64,7 @@ Foam::Istream& Foam::operator>>(Istream& is, cellShape& s)
}
else
{
FatalIOErrorIn("operator>>(Istream& is, cellShape& s)", is)
FatalIOErrorInFunction(is)
<< "Bad type of token for cellShape symbol " << t.info()
<< exit(FatalIOError);
return is;
@ -73,7 +73,7 @@ Foam::Istream& Foam::operator>>(Istream& is, cellShape& s)
// Check that a model was found
if (!s.m)
{
FatalIOErrorIn("operator>>(Istream& is, cellShape& s)", is)
FatalIOErrorInFunction(is)
<< "CellShape has unknown model " << t.info()
<< exit(FatalIOError);
return is;

View File

@ -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
@ -42,7 +42,7 @@ Foam::IOmapDistribute::IOmapDistribute(const IOobject& io)
// Temporary warning
if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED)
{
WarningIn("IOmapDistribute::IOmapDistribute(const IOobject&)")
WarningInFunction
<< "IOmapDistribute " << name()
<< " constructed with IOobject::MUST_READ_IF_MODIFIED"
" but IOmapDistribute does not support automatic rereading."
@ -75,7 +75,7 @@ Foam::IOmapDistribute::IOmapDistribute
// Temporary warning
if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED)
{
WarningIn("IOmapDistribute::IOmapDistribute(const IOobject&)")
WarningInFunction
<< "IOmapDistribute " << name()
<< " constructed with IOobject::MUST_READ_IF_MODIFIED"
" but IOmapDistribute does not support automatic rereading."
@ -112,7 +112,7 @@ Foam::IOmapDistribute::IOmapDistribute
// Temporary warning
if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED)
{
WarningIn("IOmapDistribute::IOmapDistribute(const IOobject&)")
WarningInFunction
<< "IOmapDistribute " << name()
<< " constructed with IOobject::MUST_READ_IF_MODIFIED"
" but IOmapDistribute does not support automatic rereading."

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -270,16 +270,8 @@ Foam::label Foam::coupledPolyPatch::getRotation
if (distSqr == minDistSqr && fp != anchorFp)
{
WarningIn
(
"label coupledPolyPatch::getRotation\n"
"(\n"
" const pointField&,\n"
" const face&,\n"
" const point&,\n"
" const scalar\n"
")"
) << "Cannot determine unique anchor point on face "
WarningInFunction
<< "Cannot determine unique anchor point on face "
<< UIndirectList<point>(points, f)
<< endl
<< "Both at index " << anchorFp << " and " << fp

View File

@ -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
@ -50,10 +50,8 @@ Foam::autoPtr<Foam::cellZone> Foam::cellZone::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"cellZone::New(const word&, const dictionary&, "
"const label, const cellZoneMesh&)",
dict
) << "Unknown cellZone type "
<< zoneType << nl << nl

View File

@ -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
@ -50,10 +50,8 @@ Foam::autoPtr<Foam::faceZone> Foam::faceZone::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"faceZone::New(const word&, const dictionary&, "
"const label, const faceZoneMesh&)",
dict
) << "Unknown faceZone type "
<< zoneType << nl << nl

View File

@ -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
@ -50,10 +50,8 @@ Foam::autoPtr<Foam::pointZone> Foam::pointZone::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"pointZone::New(const word&, const dictionary&, "
"const label, const pointZoneMesh&)",
dict
) << "Unknown pointZone type "
<< zoneType << nl << 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
@ -110,7 +110,7 @@ Foam::PatchTools::sortedPointEdges
nVisitedEdges++;
if (nVisitedEdges > nPointEdges)
{
WarningIn("Foam::PatchTools::sortedPointEdges()")
WarningInFunction
<< "Unable to order pointEdges as the face connections "
<< "are not circular" << nl
<< " Original pointEdges = " << pEdges << nl
@ -130,7 +130,7 @@ Foam::PatchTools::sortedPointEdges
{
if (findIndex(newEdgeList, pEdges[eI]) == -1)
{
WarningIn("Foam::PatchTools::sortedPointEdges()")
WarningInFunction
<< "Cannot find all original edges in the new list"
<< nl
<< " Original pointEdges = " << pEdges << nl

View File

@ -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
@ -42,11 +42,8 @@ Foam::treeBoundBox::treeBoundBox
// points may be empty, but a FixedList is never empty
if (points.empty())
{
WarningIn
(
"treeBoundBox::treeBoundBox"
"(const UList<point>&, const FixedList<label, Size>&)"
) << "cannot find bounding box for zero-sized pointField, "
WarningInFunction
<< "cannot find bounding box for zero-sized pointField, "
<< "returning zero" << endl;
return;

View File

@ -90,7 +90,7 @@ Istream& operator>>(Istream& is, Scalar& s)
else
{
is.setBad();
FatalIOErrorIn("operator>>(Istream&, Scalar&)", is)
FatalIOErrorInFunction(is)
<< "wrong token type - expected Scalar, found " << t.info()
<< exit(FatalIOError);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -165,7 +165,7 @@ Foam::vector Foam::eigenValues(const tensor& t)
// based on the above logic, PPP must be less than QQ
else
{
WarningIn("eigenValues(const tensor&)")
WarningInFunction
<< "complex eigenvalues detected for tensor: " << t
<< endl;

View File

@ -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
@ -62,7 +62,7 @@ Foam::Istream& Foam::operator>>(Istream& is, Switch& s)
else
{
is.setBad();
FatalIOErrorIn("operator>>(Istream&, bool/Switch&)", is)
FatalIOErrorInFunction(is)
<< "expected 'true/false', 'on/off' ... found " << t.wordToken()
<< exit(FatalIOError);
@ -72,7 +72,7 @@ Foam::Istream& Foam::operator>>(Istream& is, Switch& s)
else
{
is.setBad();
FatalIOErrorIn("operator>>(Istream&, bool/Switch&)", is)
FatalIOErrorInFunction(is)
<< "wrong token type - expected bool, found " << t
<< exit(FatalIOError);

View File

@ -46,9 +46,8 @@ Foam::TableFile<Type>::TableFile(const word& entryName, const dictionary& dict)
if (!is.good())
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"TableFile<Type>::TableFile(const word&, const dictionary&)",
is
) << "Cannot open file." << exit(FatalIOError);
}

View File

@ -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
@ -57,7 +57,7 @@ unsigned char Foam::SHA1Digest::readHexDigit(Istream& is)
if (!isxdigit(c))
{
FatalIOErrorIn("SHA1Digest::readHexDigit(Istream&)", is)
FatalIOErrorInFunction(is)
<< "Illegal hex digit: '" << c << "'"
<< exit(FatalIOError);
}

View File

@ -61,7 +61,7 @@ Foam::Istream& Foam::operator>>(Istream& is, int32_t& i)
else
{
is.setBad();
FatalIOErrorIn("operator>>(Istream&, int32_t&)", is)
FatalIOErrorInFunction(is)
<< "wrong token type - expected int32_t, found " << t.info()
<< exit(FatalIOError);

View File

@ -61,7 +61,7 @@ Foam::Istream& Foam::operator>>(Istream& is, int64_t& i)
else
{
is.setBad();
FatalIOErrorIn("operator>>(Istream&, int64_t&)", is)
FatalIOErrorInFunction(is)
<< "wrong token type - expected int64_t, found " << t.info()
<< exit(FatalIOError);

View File

@ -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
@ -59,7 +59,7 @@ Foam::Istream& Foam::operator>>(Istream& is, uint32_t& i)
else
{
is.setBad();
FatalIOErrorIn("operator>>(Istream&, uint32_t&)", is)
FatalIOErrorInFunction(is)
<< "wrong token type - expected uint32_t, found " << t.info()
<< exit(FatalIOError);

View File

@ -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
@ -59,7 +59,7 @@ Foam::Istream& Foam::operator>>(Istream& is, uint64_t& i)
else
{
is.setBad();
FatalIOErrorIn("operator>>(Istream&, uint64_t&)", is)
FatalIOErrorInFunction(is)
<< "wrong token type - expected uint64_t, found " << t.info()
<< exit(FatalIOError);

View File

@ -97,10 +97,8 @@ Foam::cachedRandom::cachedRandom(const cachedRandom& cr, const bool reset)
}
if (sampleI_ == -1)
{
WarningIn
(
"Foam::cachedRandom::cachedRandom(const cachedRandom& cr)"
) << "Copy constructor called, but samples not being cached. "
WarningInFunction
<< "Copy constructor called, but samples not being cached. "
<< "This may lead to non-repeatable behaviour" << endl;
osRandomSeed(seed_);

View File

@ -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
@ -53,7 +53,7 @@ Foam::Istream& Foam::operator>>(Istream& is, fileName& fn)
else
{
is.setBad();
FatalIOErrorIn("operator>>(Istream&, fileName&)", is)
FatalIOErrorInFunction(is)
<< "wrong token type - expected string, found " << t.info()
<< exit(FatalIOError);

View File

@ -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
@ -93,7 +93,7 @@ Foam::Istream& Foam::operator>>(Istream& is, keyType& kw)
if (kw.empty())
{
is.setBad();
FatalIOErrorIn("operator>>(Istream&, keyType&)", is)
FatalIOErrorInFunction(is)
<< "empty word/expression "
<< exit(FatalIOError);
return is;
@ -102,7 +102,7 @@ Foam::Istream& Foam::operator>>(Istream& is, keyType& kw)
else
{
is.setBad();
FatalIOErrorIn("operator>>(Istream&, keyType&)", is)
FatalIOErrorInFunction(is)
<< "wrong token type - expected word or string, found "
<< t.info()
<< exit(FatalIOError);

View File

@ -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
@ -53,7 +53,7 @@ Foam::Istream& Foam::operator>>(Istream& is, string& s)
else
{
is.setBad();
FatalIOErrorIn("operator>>(Istream&, string&)", is)
FatalIOErrorInFunction(is)
<< "wrong token type - expected string, found " << t.info()
<< exit(FatalIOError);

View File

@ -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
@ -60,7 +60,7 @@ Foam::Istream& Foam::operator>>(Istream& is, word& w)
if (w.empty() || w.size() != t.stringToken().size())
{
is.setBad();
FatalIOErrorIn("operator>>(Istream&, word&)", is)
FatalIOErrorInFunction(is)
<< "wrong token type - expected word, found "
"non-word characters "
<< t.info()
@ -71,7 +71,7 @@ Foam::Istream& Foam::operator>>(Istream& is, word& w)
else
{
is.setBad();
FatalIOErrorIn("operator>>(Istream&, word&)", is)
FatalIOErrorInFunction(is)
<< "wrong token type - expected word, found "
<< t.info()
<< exit(FatalIOError);

View File

@ -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
@ -68,7 +68,7 @@ Foam::Istream& Foam::operator>>(Istream& is, wordRe& w)
if (w.empty())
{
is.setBad();
FatalIOErrorIn("operator>>(Istream&, wordRe&)", is)
FatalIOErrorInFunction(is)
<< "empty word/expression "
<< exit(FatalIOError);
return is;
@ -77,7 +77,7 @@ Foam::Istream& Foam::operator>>(Istream& is, wordRe& w)
else
{
is.setBad();
FatalIOErrorIn("operator>>(Istream&, wordRe&)", is)
FatalIOErrorInFunction(is)
<< "wrong token type - expected word or string, found "
<< t.info()
<< exit(FatalIOError);