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 e2ef006b91
commit dc43311e62
84 changed files with 309 additions and 491 deletions

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -76,9 +76,8 @@ void Foam::HashPtrTable<T, Key, Hash>::read(Istream& is, const INew& inewt)
} }
else else
{ {
FatalIOErrorIn FatalIOErrorInFunction
( (
"HashPtrTable<T, Key, Hash>::read(Istream&, const INew&)",
is is
) << "incorrect first token, '(', found " << firstToken.info() ) << "incorrect first token, '(', found " << firstToken.info()
<< exit(FatalIOError); << exit(FatalIOError);
@ -92,9 +91,8 @@ void Foam::HashPtrTable<T, Key, Hash>::read(Istream& is, const INew& inewt)
{ {
if (firstToken.pToken() != token::BEGIN_LIST) if (firstToken.pToken() != token::BEGIN_LIST)
{ {
FatalIOErrorIn FatalIOErrorInFunction
( (
"HashPtrTable<T, Key, Hash>::read(Istream&, const INew&)",
is is
) << "incorrect first token, '(', found " << firstToken.info() ) << "incorrect first token, '(', found " << firstToken.info()
<< exit(FatalIOError); << exit(FatalIOError);
@ -125,9 +123,8 @@ void Foam::HashPtrTable<T, Key, Hash>::read(Istream& is, const INew& inewt)
} }
else else
{ {
FatalIOErrorIn FatalIOErrorInFunction
( (
"HashPtrTable<T, Key, Hash>::read(Istream&, const INew&)",
is is
) << "incorrect first token, expected <int> or '(', found " ) << "incorrect first token, expected <int> or '(', found "
<< firstToken.info() << firstToken.info()

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -145,9 +145,8 @@ Foam::Istream& Foam::operator>>
} }
else else
{ {
FatalIOErrorIn FatalIOErrorInFunction
( (
"operator>>(Istream&, HashTable<T, Key, Hash>&)",
is is
) << "incorrect first token, '(', found " << firstToken.info() ) << "incorrect first token, '(', found " << firstToken.info()
<< exit(FatalIOError); << exit(FatalIOError);
@ -161,9 +160,8 @@ Foam::Istream& Foam::operator>>
{ {
if (firstToken.pToken() != token::BEGIN_LIST) if (firstToken.pToken() != token::BEGIN_LIST)
{ {
FatalIOErrorIn FatalIOErrorInFunction
( (
"operator>>(Istream&, HashTable<T, Key, Hash>&)",
is is
) << "incorrect first token, '(', found " << firstToken.info() ) << "incorrect first token, '(', found " << firstToken.info()
<< exit(FatalIOError); << exit(FatalIOError);
@ -199,9 +197,8 @@ Foam::Istream& Foam::operator>>
} }
else else
{ {
FatalIOErrorIn FatalIOErrorInFunction
( (
"operator>>(Istream&, HashTable<T, Key, Hash>&)",
is is
) << "incorrect first token, expected <int> or '(', found " ) << "incorrect first token, expected <int> or '(', found "
<< firstToken.info() << firstToken.info()

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -89,9 +89,8 @@ void Foam::ILList<LListBase, T>::read(Istream& is, const INew& iNew)
{ {
if (firstToken.pToken() != token::BEGIN_LIST) if (firstToken.pToken() != token::BEGIN_LIST)
{ {
FatalIOErrorIn FatalIOErrorInFunction
( (
"operator>>(Istream&, ILList<LListBase, T>&)",
is is
) << "incorrect first token, '(', found " << firstToken.info() ) << "incorrect first token, '(', found " << firstToken.info()
<< exit(FatalIOError); << exit(FatalIOError);
@ -117,7 +116,7 @@ void Foam::ILList<LListBase, T>::read(Istream& is, const INew& iNew)
} }
else else
{ {
FatalIOErrorIn("operator>>(Istream&, ILList<LListBase, T>&)", is) FatalIOErrorInFunction(is)
<< "incorrect first token, expected <int> or '(', found " << "incorrect first token, expected <int> or '(', found "
<< firstToken.info() << firstToken.info()
<< exit(FatalIOError); << exit(FatalIOError);

View File

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

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -94,9 +94,8 @@ void Foam::LPtrList<LListBase, T>::read(Istream& is, const INew& iNew)
{ {
if (firstToken.pToken() != token::BEGIN_LIST) if (firstToken.pToken() != token::BEGIN_LIST)
{ {
FatalIOErrorIn FatalIOErrorInFunction
( (
"LPtrList<LListBase, T>::read(Istream&, const INew&)",
is is
) << "incorrect first token, '(', found " << firstToken.info() ) << "incorrect first token, '(', found " << firstToken.info()
<< exit(FatalIOError); << exit(FatalIOError);
@ -125,9 +124,8 @@ void Foam::LPtrList<LListBase, T>::read(Istream& is, const INew& iNew)
} }
else else
{ {
FatalIOErrorIn FatalIOErrorInFunction
( (
"LPtrList<LListBase, T>::read(Istream&, const INew&)",
is is
) << "incorrect first token, expected <int> or '(', found " ) << "incorrect first token, expected <int> or '(', found "
<< firstToken.info() << firstToken.info()

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -41,7 +41,7 @@ bool Foam::IOobject::readHeader(Istream& is)
{ {
if (rOpt_ == MUST_READ || rOpt_ == MUST_READ_IF_MODIFIED) 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 " << " stream not open for reading essential object from file "
<< is.name() << is.name()
<< exit(FatalIOError); << exit(FatalIOError);
@ -49,7 +49,7 @@ bool Foam::IOobject::readHeader(Istream& is)
if (IOobject::debug) if (IOobject::debug)
{ {
SeriousIOErrorIn("IOobject::readHeader(Istream&)", is) SeriousIOErrorInFunction(is)
<< " stream not open for reading from file " << " stream not open for reading from file "
<< is.name() << endl; << is.name() << endl;
} }
@ -75,7 +75,7 @@ bool Foam::IOobject::readHeader(Istream& is)
const word headerObject(headerDict.lookup("object")); const word headerObject(headerDict.lookup("object"));
if (IOobject::debug && headerObject != name()) if (IOobject::debug && headerObject != name())
{ {
IOWarningIn("IOobject::readHeader(Istream&)", is) IOWarningInFunction(is)
<< " object renamed from " << " object renamed from "
<< name() << " to " << headerObject << name() << " to " << headerObject
<< " for file " << is.name() << endl; << " for file " << is.name() << endl;
@ -86,7 +86,7 @@ bool Foam::IOobject::readHeader(Istream& is)
} }
else else
{ {
IOWarningIn("IOobject::readHeader(Istream&)", is) IOWarningInFunction(is)
<< "First token could not be read or is not the keyword 'FoamFile'" << "First token could not be read or is not the keyword 'FoamFile'"
<< nl << nl << "Check header is of the form:" << nl << endl; << 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) if (rOpt_ == MUST_READ || rOpt_ == MUST_READ_IF_MODIFIED)
{ {
FatalIOErrorIn("IOobject::readHeader(Istream&)", is) FatalIOErrorInFunction(is)
<< " stream failure while reading header" << " stream failure while reading header"
<< " on line " << is.lineNumber() << " on line " << is.lineNumber()
<< " of file " << is.name() << " of file " << is.name()

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -45,9 +45,8 @@ void Foam::CompactIOField<T, BaseType>::readFromStream()
} }
else else
{ {
FatalIOErrorIn FatalIOErrorInFunction
( (
"CompactIOField<T, BaseType>::readFromStream()",
is is
) << "unexpected class name " << headerClassName() ) << "unexpected class name " << headerClassName()
<< " expected " << typeName << " or " << IOField<T>::typeName << " expected " << typeName << " or " << IOField<T>::typeName

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -45,9 +45,8 @@ void Foam::CompactIOList<T, BaseType>::readFromStream()
} }
else else
{ {
FatalIOErrorIn FatalIOErrorInFunction
( (
"CompactIOList<T, BaseType>::readFromStream()",
is is
) << "unexpected class name " << headerClassName() ) << "unexpected class name " << headerClassName()
<< " expected " << typeName << " or " << IOList<T>::typeName << " expected " << typeName << " or " << IOList<T>::typeName

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -35,7 +35,7 @@ Foam::IOField<Type>::IOField(const IOobject& io)
// Temporary warning // Temporary warning
if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED) if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED)
{ {
WarningIn("IOField::IOField(const IOobject&)") WarningInFunction
<< "IOField " << name() << "IOField " << name()
<< " constructed with IOobject::MUST_READ_IF_MODIFIED" << " constructed with IOobject::MUST_READ_IF_MODIFIED"
" but IOField does not support automatic rereading." " but IOField does not support automatic rereading."
@ -65,7 +65,7 @@ Foam::IOField<Type>::IOField(const IOobject& io, const label size)
// Temporary warning // Temporary warning
if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED) if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED)
{ {
WarningIn("IOField::IOField(const IOobject&, const label)") WarningInFunction
<< "IOField " << name() << "IOField " << name()
<< " constructed with IOobject::MUST_READ_IF_MODIFIED" << " constructed with IOobject::MUST_READ_IF_MODIFIED"
" but IOField does not support automatic rereading." " but IOField does not support automatic rereading."
@ -99,7 +99,7 @@ Foam::IOField<Type>::IOField(const IOobject& io, const Field<Type>& f)
// Temporary warning // Temporary warning
if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED) if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED)
{ {
WarningIn("IOField::IOField(const IOobject&, const Field<Type>&)") WarningInFunction
<< "IOField " << name() << "IOField " << name()
<< " constructed with IOobject::MUST_READ_IF_MODIFIED" << " constructed with IOobject::MUST_READ_IF_MODIFIED"
" but IOField does not support automatic rereading." " 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 // Temporary warning
if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED) if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED)
{ {
WarningIn WarningInFunction
( << "IOField " << name()
"IOField::IOField(const IOobject&, const Xfer<Field<Type> >&)"
) << "IOField " << name()
<< " constructed with IOobject::MUST_READ_IF_MODIFIED" << " constructed with IOobject::MUST_READ_IF_MODIFIED"
" but IOField does not support automatic rereading." " but IOField does not support automatic rereading."
<< endl; << endl;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -35,7 +35,7 @@ Foam::IOList<T>::IOList(const IOobject& io)
// Temporary warning // Temporary warning
if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED) if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED)
{ {
WarningIn("IOList::IOList(const IOobject&)") WarningInFunction
<< "IOList " << name() << "IOList " << name()
<< " constructed with IOobject::MUST_READ_IF_MODIFIED" << " constructed with IOobject::MUST_READ_IF_MODIFIED"
" but IOList does not support automatic rereading." " but IOList does not support automatic rereading."
@ -64,7 +64,7 @@ Foam::IOList<T>::IOList(const IOobject& io, const label size)
// Temporary warning // Temporary warning
if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED) if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED)
{ {
WarningIn("IOList::IOList(const IOobject&, const label)") WarningInFunction
<< "IOList " << name() << "IOList " << name()
<< " constructed with IOobject::MUST_READ_IF_MODIFIED" << " constructed with IOobject::MUST_READ_IF_MODIFIED"
" but IOList does not support automatic rereading." " but IOList does not support automatic rereading."
@ -97,7 +97,7 @@ Foam::IOList<T>::IOList(const IOobject& io, const List<T>& list)
// Temporary warning // Temporary warning
if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED) if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED)
{ {
WarningIn("IOList::IOList(const IOobject&, const List<T>&)") WarningInFunction
<< "IOList " << name() << "IOList " << name()
<< " constructed with IOobject::MUST_READ_IF_MODIFIED" << " constructed with IOobject::MUST_READ_IF_MODIFIED"
" but IOList does not support automatic rereading." " 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 // Temporary warning
if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED) if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED)
{ {
WarningIn WarningInFunction
( << "IOList " << name()
"IOList::IOList(const IOobject&, const Xfer<List<T> >&)"
) << "IOList " << name()
<< " constructed with IOobject::MUST_READ_IF_MODIFIED" << " constructed with IOobject::MUST_READ_IF_MODIFIED"
" but IOList does not support automatic rereading." " but IOList does not support automatic rereading."
<< endl; << endl;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -49,7 +49,7 @@ Foam::IOdictionary::IOdictionary(const IOobject& io)
// Temporary warning // Temporary warning
if (debug && io.readOpt() == IOobject::MUST_READ) if (debug && io.readOpt() == IOobject::MUST_READ)
{ {
WarningIn("IOdictionary::IOdictionary(const IOobject&)") WarningInFunction
<< "Dictionary " << name() << "Dictionary " << name()
<< " constructed with IOobject::MUST_READ" << " constructed with IOobject::MUST_READ"
" instead of IOobject::MUST_READ_IF_MODIFIED." << nl " instead of IOobject::MUST_READ_IF_MODIFIED." << nl
@ -105,10 +105,8 @@ Foam::IOdictionary::IOdictionary(const IOobject& io, const dictionary& dict)
// Temporary warning // Temporary warning
if (debug && io.readOpt() == IOobject::MUST_READ) if (debug && io.readOpt() == IOobject::MUST_READ)
{ {
WarningIn WarningInFunction
( << "Dictionary " << name()
"IOdictionary::IOdictionary(const IOobject& const dictionary&)"
) << "Dictionary " << name()
<< " constructed with IOobject::MUST_READ" << " constructed with IOobject::MUST_READ"
" instead of IOobject::MUST_READ_IF_MODIFIED." << nl " instead of IOobject::MUST_READ_IF_MODIFIED." << nl
<< "Use MUST_READ_IF_MODIFIED if you need automatic rereading." << "Use MUST_READ_IF_MODIFIED if you need automatic rereading."

View File

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

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -31,13 +31,13 @@ void Foam::Istream::putBack(const token& t)
{ {
if (bad()) if (bad())
{ {
FatalIOErrorIn("void Istream::putBack(const token&)", *this) FatalIOErrorInFunction(*this)
<< "Attempt to put back onto bad stream" << "Attempt to put back onto bad stream"
<< exit(FatalIOError); << exit(FatalIOError);
} }
else if (putBack_) else if (putBack_)
{ {
FatalIOErrorIn("void Istream::putBack(const token&)", *this) FatalIOErrorInFunction(*this)
<< "Attempt to put back another token" << "Attempt to put back another token"
<< exit(FatalIOError); << exit(FatalIOError);
} }
@ -53,7 +53,7 @@ bool Foam::Istream::getBack(token& t)
{ {
if (bad()) if (bad())
{ {
FatalIOErrorIn("void Istream::getBack(token&)", *this) FatalIOErrorInFunction(*this)
<< "Attempt to get back from bad stream" << "Attempt to get back from bad stream"
<< exit(FatalIOError); << exit(FatalIOError);
} }
@ -91,7 +91,7 @@ Foam::Istream& Foam::Istream::readBegin(const char* funcName)
if (delimiter != token::BEGIN_LIST) if (delimiter != token::BEGIN_LIST)
{ {
setBad(); setBad();
FatalIOErrorIn("Istream::readBegin(const char*)", *this) FatalIOErrorInFunction(*this)
<< "Expected a '" << token::BEGIN_LIST << "Expected a '" << token::BEGIN_LIST
<< "' while reading " << funcName << "' while reading " << funcName
<< ", found " << delimiter.info() << ", found " << delimiter.info()
@ -108,7 +108,7 @@ Foam::Istream& Foam::Istream::readEnd(const char* funcName)
if (delimiter != token::END_LIST) if (delimiter != token::END_LIST)
{ {
setBad(); setBad();
FatalIOErrorIn("Istream::readEnd(const char*)", *this) FatalIOErrorInFunction(*this)
<< "Expected a '" << token::END_LIST << "Expected a '" << token::END_LIST
<< "' while reading " << funcName << "' while reading " << funcName
<< ", found " << delimiter.info() << ", found " << delimiter.info()
@ -135,7 +135,7 @@ char Foam::Istream::readBeginList(const char* funcName)
if (delimiter != token::BEGIN_LIST && delimiter != token::BEGIN_BLOCK) if (delimiter != token::BEGIN_LIST && delimiter != token::BEGIN_BLOCK)
{ {
setBad(); setBad();
FatalIOErrorIn("Istream::readBeginList(const char*)", *this) FatalIOErrorInFunction(*this)
<< "Expected a '" << token::BEGIN_LIST << "Expected a '" << token::BEGIN_LIST
<< "' or a '" << token::BEGIN_BLOCK << "' or a '" << token::BEGIN_BLOCK
<< "' while reading " << funcName << "' while reading " << funcName
@ -156,7 +156,7 @@ char Foam::Istream::readEndList(const char* funcName)
if (delimiter != token::END_LIST && delimiter != token::END_BLOCK) if (delimiter != token::END_LIST && delimiter != token::END_BLOCK)
{ {
setBad(); setBad();
FatalIOErrorIn("Istream::readEndList(const char*)", *this) FatalIOErrorInFunction(*this)
<< "Expected a '" << token::END_LIST << "Expected a '" << token::END_LIST
<< "' or a '" << token::END_BLOCK << "' or a '" << token::END_BLOCK
<< "' while reading " << funcName << "' while reading " << funcName

View File

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

View File

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

View File

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

View File

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

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -67,7 +67,7 @@ Foam::autoPtr<Foam::token::compound> Foam::token::compound::New
if (cstrIter == IstreamConstructorTablePtr_->end()) if (cstrIter == IstreamConstructorTablePtr_->end())
{ {
FatalIOErrorIn("token::compound::New(const word&, Istream&)", is) FatalIOErrorInFunction(is)
<< "Unknown compound type " << compoundType << nl << nl << "Unknown compound type " << compoundType << nl << nl
<< "Valid compound types:" << endl << "Valid compound types:" << endl
<< IstreamConstructorTablePtr_->sortedToc() << IstreamConstructorTablePtr_->sortedToc()
@ -96,11 +96,8 @@ Foam::token::compound& Foam::token::transferCompoundToken(const Istream& is)
{ {
if (compoundTokenPtr_->empty()) if (compoundTokenPtr_->empty())
{ {
FatalIOErrorIn FatalIOErrorInFunction(is)
( << "compound has already been transfered from token\n "
"token::transferCompoundToken(const Istream& is)",
is
) << "compound has already been transfered from token\n "
<< info() << abort(FatalIOError); << info() << abort(FatalIOError);
} }
else else

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -80,7 +80,7 @@ Foam::label Foam::dictionaryEntry::endLineNumber() const
Foam::ITstream& Foam::dictionaryEntry::stream() const Foam::ITstream& Foam::dictionaryEntry::stream() const
{ {
FatalIOErrorIn("ITstream& primitiveEntry::stream() const", *this) FatalIOErrorInFunction(*this)
<< "Attempt to return dictionary entry as a primitive" << "Attempt to return dictionary entry as a primitive"
<< abort(FatalIOError); << abort(FatalIOError);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -88,7 +88,7 @@ bool Foam::dictionary::read(Istream& is, const bool keepHeader)
if (!is.good()) if (!is.good())
{ {
FatalIOErrorIn("dictionary::read(Istream&, bool)", is) FatalIOErrorInFunction(is)
<< "Istream not OK for reading dictionary " << "Istream not OK for reading dictionary "
<< exit(FatalIOError); << exit(FatalIOError);
@ -193,7 +193,7 @@ void Foam::dictionary::write(Ostream& os, bool subDict) const
// Check stream before going to next entry. // Check stream before going to next entry.
if (!os.good()) if (!os.good())
{ {
WarningIn("dictionary::write(Ostream&, bool subDict)") WarningInFunction
<< "Can't write entry " << iter().keyword() << "Can't write entry " << iter().keyword()
<< " for dictionary " << name() << " for dictionary " << name()
<< endl; << endl;

View File

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

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -156,11 +156,7 @@ bool Foam::entry::New(dictionary& parentDict, Istream& is)
} }
else else
{ {
FatalIOErrorIn FatalIOErrorInFunction(is)
(
"entry::New(const dictionary& parentDict, Istream&)",
is
)
<< "Attempt to use undefined variable " << varName << "Attempt to use undefined variable " << varName
<< " as keyword" << " as keyword"
<< exit(FatalIOError); << exit(FatalIOError);
@ -228,11 +224,7 @@ bool Foam::entry::New(dictionary& parentDict, Istream& is)
} }
else if (functionEntries::inputModeEntry::error()) else if (functionEntries::inputModeEntry::error())
{ {
FatalIOErrorIn FatalIOErrorInFunction(is)
(
"entry::New(const dictionary& parentDict, Istream&)",
is
)
<< "ERROR! duplicate entry: " << keyword << "ERROR! duplicate entry: " << keyword
<< exit(FatalIOError); << exit(FatalIOError);

View File

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

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -140,10 +140,8 @@ bool Foam::functionEntries::includeEntry::execute
} }
else else
{ {
FatalIOErrorIn FatalIOErrorInFunction
( (
"functionEntries::includeEntry::includeEntry"
"(dictionary& parentDict, Istream&)",
is is
) << "Cannot open include file " ) << "Cannot open include file "
<< (ifs.name().size() ? ifs.name() : rawFName) << (ifs.name().size() ? ifs.name() : rawFName)
@ -180,10 +178,8 @@ bool Foam::functionEntries::includeEntry::execute
} }
else else
{ {
FatalIOErrorIn FatalIOErrorInFunction
( (
"functionEntries::includeEntry::includeEntry"
"(dictionary& parentDict, primitiveEntry&, Istream&)",
is is
) << "Cannot open include file " ) << "Cannot open include file "
<< (ifs.name().size() ? ifs.name() : rawFName) << (ifs.name().size() ? ifs.name() : rawFName)

View File

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

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -85,7 +85,7 @@ void Foam::functionEntries::inputModeEntry::setMode(Istream& is)
} }
else else
{ {
WarningIn("Foam::functionEntries::inputModeEntry::setMode(Istream&)") WarningInFunction
<< "unsupported input mode '" << mode << "unsupported input mode '" << mode
<< "' ... defaulting to 'merge'" << "' ... defaulting to 'merge'"
<< endl; << endl;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -182,9 +182,8 @@ void Foam::primitiveEntry::readEntry(const dictionary& dict, Istream& is)
<< " on line " << keywordLineNumber << " on line " << keywordLineNumber
<< " and ending at line " << is.lineNumber(); << " and ending at line " << is.lineNumber();
SafeFatalIOErrorIn SafeFatalIOErrorInFunction
( (
"primitiveEntry::readEntry(const dictionary&, Istream&)",
is, is,
os.str() os.str()
); );

View File

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

View File

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

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -59,22 +59,14 @@ bool Foam::dlLibraryTable::open
if (!opened) if (!opened)
{ {
WarningIn WarningInFunction
( << "Could not open library " << libName
"dlLibraryTable::open"
"(const dictionary&, const word&, "
"const TablePtr&)"
) << "Could not open library " << libName
<< endl << endl; << endl << endl;
} }
else if (debug && (!tablePtr || tablePtr->size() <= nEntries)) else if (debug && (!tablePtr || tablePtr->size() <= nEntries))
{ {
WarningIn WarningInFunction
( << "library " << libName
"dlLibraryTable::open"
"(const dictionary&, const word&, "
"const TablePtr&)"
) << "library " << libName
<< " did not introduce any new entries" << " did not introduce any new entries"
<< endl << endl; << endl << endl;
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -125,9 +125,8 @@ void Foam::IOerror::SafeFatalIOError
{ {
if (JobInfo::constructed) if (JobInfo::constructed)
{ {
FatalIOErrorIn FatalIOErrorInFunction
( (
"primitiveEntry::readEntry(const dictionary&, Istream&)",
ioStream ioStream
) << msg << Foam::exit(FatalIOError); ) << msg << Foam::exit(FatalIOError);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -185,7 +185,7 @@ Foam::label Foam::objectRegistry::getEvent() const
{ {
if (objectRegistry::debug) if (objectRegistry::debug)
{ {
WarningIn("objectRegistry::getEvent() const") WarningInFunction
<< "Event counter has overflowed. " << "Event counter has overflowed. "
<< "Resetting counter on all dependent objects." << nl << "Resetting counter on all dependent objects." << nl
<< "This might cause extra evaluations." << endl; << "This might cause extra evaluations." << endl;
@ -246,7 +246,7 @@ bool Foam::objectRegistry::checkOut(regIOobject& io) const
{ {
if (objectRegistry::debug) if (objectRegistry::debug)
{ {
WarningIn("objectRegistry::checkOut(regIOobject&)") WarningInFunction
<< name() << " : attempt to checkOut copy of " << name() << " : attempt to checkOut copy of "
<< iter.key() << iter.key()
<< endl; << endl;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -42,7 +42,7 @@ bool Foam::regIOobject::writeObject
{ {
if (!good()) if (!good())
{ {
SeriousErrorIn("regIOobject::write()") SeriousErrorInFunction
<< "bad object " << name() << "bad object " << name()
<< endl; << endl;
@ -51,7 +51,7 @@ bool Foam::regIOobject::writeObject
if (instance().empty()) if (instance().empty())
{ {
SeriousErrorIn("regIOobject::write()") SeriousErrorInFunction
<< "instance undefined for object " << name() << "instance undefined for object " << name()
<< endl; << endl;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -64,11 +64,8 @@ splineInterpolationWeights::splineInterpolationWeights
if (mag(d-interval) > SMALL) if (mag(d-interval) > SMALL)
{ {
WarningIn WarningInFunction
( << "Spline interpolation only valid for constant intervals."
"splineInterpolationWeights::splineInterpolationWeights"
"(const scalarField&)"
) << "Spline interpolation only valid for constant intervals."
<< nl << nl
<< "Interval 0-1 : " << interval << nl << "Interval 0-1 : " << interval << nl
<< "Interval " << i-1 << '-' << i << " : " << "Interval " << i-1 << '-' << i << " : "

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -44,10 +44,8 @@ Foam::LduMatrix<Type, DType, LUType>::preconditioner::New
if (constructorIter == symMatrixConstructorTablePtr_->end()) if (constructorIter == symMatrixConstructorTablePtr_->end())
{ {
FatalIOErrorIn FatalIOErrorInFunction
( (
"LduMatrix<Type, DType, LUType>::preconditioner::New"
"(const solver&, Istream&)",
preconditionerDict preconditionerDict
) << "Unknown symmetric matrix preconditioner " ) << "Unknown symmetric matrix preconditioner "
<< preconditionerName << endl << endl << preconditionerName << endl << endl
@ -72,10 +70,8 @@ Foam::LduMatrix<Type, DType, LUType>::preconditioner::New
if (constructorIter == asymMatrixConstructorTablePtr_->end()) if (constructorIter == asymMatrixConstructorTablePtr_->end())
{ {
FatalIOErrorIn FatalIOErrorInFunction
( (
"LduMatrix<Type, DType, LUType>::preconditioner::New"
"(const solver&, Istream&)",
preconditionerDict preconditionerDict
) << "Unknown asymmetric matrix preconditioner " ) << "Unknown asymmetric matrix preconditioner "
<< preconditionerName << endl << endl << preconditionerName << endl << endl
@ -95,10 +91,8 @@ Foam::LduMatrix<Type, DType, LUType>::preconditioner::New
} }
else else
{ {
FatalIOErrorIn FatalIOErrorInFunction
( (
"LduMatrix<Type, DType, LUType>::preconditioner::New"
"(const solver&, Istream&)",
preconditionerDict preconditionerDict
) << "cannot preconditione incomplete matrix, " ) << "cannot preconditione incomplete matrix, "
"no diagonal or off-diagonal coefficient" "no diagonal or off-diagonal coefficient"

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -45,10 +45,8 @@ Foam::LduMatrix<Type, DType, LUType>::smoother::New
if (constructorIter == symMatrixConstructorTablePtr_->end()) if (constructorIter == symMatrixConstructorTablePtr_->end())
{ {
FatalIOErrorIn FatalIOErrorInFunction(smootherDict)
( << "Unknown symmetric matrix smoother " << smootherName
"LduMatrix<Type, DType, LUType>::smoother::New", smootherDict
) << "Unknown symmetric matrix smoother " << smootherName
<< endl << endl << endl << endl
<< "Valid symmetric matrix smoothers are :" << endl << "Valid symmetric matrix smoothers are :" << endl
<< symMatrixConstructorTablePtr_->toc() << symMatrixConstructorTablePtr_->toc()
@ -71,10 +69,8 @@ Foam::LduMatrix<Type, DType, LUType>::smoother::New
if (constructorIter == asymMatrixConstructorTablePtr_->end()) if (constructorIter == asymMatrixConstructorTablePtr_->end())
{ {
FatalIOErrorIn FatalIOErrorInFunction(smootherDict)
( << "Unknown asymmetric matrix smoother " << smootherName
"LduMatrix<Type, DType, LUType>::smoother::New", smootherDict
) << "Unknown asymmetric matrix smoother " << smootherName
<< endl << endl << endl << endl
<< "Valid asymmetric matrix smoothers are :" << endl << "Valid asymmetric matrix smoothers are :" << endl
<< asymMatrixConstructorTablePtr_->toc() << asymMatrixConstructorTablePtr_->toc()
@ -92,10 +88,8 @@ Foam::LduMatrix<Type, DType, LUType>::smoother::New
} }
else else
{ {
FatalIOErrorIn FatalIOErrorInFunction(smootherDict)
( << "cannot solve incomplete matrix, no off-diagonal coefficients"
"LduMatrix<Type, DType, LUType>::smoother::New", smootherDict
) << "cannot solve incomplete matrix, no off-diagonal coefficients"
<< exit(FatalIOError); << exit(FatalIOError);
return autoPtr<typename LduMatrix<Type, DType, LUType>::smoother>(NULL); return autoPtr<typename LduMatrix<Type, DType, LUType>::smoother>(NULL);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -58,10 +58,8 @@ Foam::LduMatrix<Type, DType, LUType>::solver::New
if (constructorIter == symMatrixConstructorTablePtr_->end()) if (constructorIter == symMatrixConstructorTablePtr_->end())
{ {
FatalIOErrorIn FatalIOErrorInFunction(solverDict)
( << "Unknown symmetric matrix solver " << solverName
"LduMatrix<Type, DType, LUType>::solver::New", solverDict
) << "Unknown symmetric matrix solver " << solverName
<< endl << endl << endl << endl
<< "Valid symmetric matrix solvers are :" << endl << "Valid symmetric matrix solvers are :" << endl
<< symMatrixConstructorTablePtr_->toc() << symMatrixConstructorTablePtr_->toc()
@ -85,10 +83,8 @@ Foam::LduMatrix<Type, DType, LUType>::solver::New
if (constructorIter == asymMatrixConstructorTablePtr_->end()) if (constructorIter == asymMatrixConstructorTablePtr_->end())
{ {
FatalIOErrorIn FatalIOErrorInFunction(solverDict)
( << "Unknown asymmetric matrix solver " << solverName
"LduMatrix<Type, DType, LUType>::solver::New", solverDict
) << "Unknown asymmetric matrix solver " << solverName
<< endl << endl << endl << endl
<< "Valid asymmetric matrix solvers are :" << endl << "Valid asymmetric matrix solvers are :" << endl
<< asymMatrixConstructorTablePtr_->toc() << asymMatrixConstructorTablePtr_->toc()
@ -107,10 +103,8 @@ Foam::LduMatrix<Type, DType, LUType>::solver::New
} }
else else
{ {
FatalIOErrorIn FatalIOErrorInFunction(solverDict)
( << "cannot solve incomplete matrix, "
"LduMatrix<Type, DType, LUType>::solver::New", solverDict
) << "cannot solve incomplete matrix, "
"no diagonal or off-diagonal coefficient" "no diagonal or off-diagonal coefficient"
<< exit(FatalIOError); << exit(FatalIOError);

View File

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

View File

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

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -87,10 +87,8 @@ Foam::lduMatrix::preconditioner::New
if (constructorIter == symMatrixConstructorTablePtr_->end()) if (constructorIter == symMatrixConstructorTablePtr_->end())
{ {
FatalIOErrorIn FatalIOErrorInFunction
( (
"lduMatrix::preconditioner::New"
"(const solver&, const dictionary&)",
controls controls
) << "Unknown symmetric matrix preconditioner " ) << "Unknown symmetric matrix preconditioner "
<< name << nl << nl << name << nl << nl
@ -115,10 +113,8 @@ Foam::lduMatrix::preconditioner::New
if (constructorIter == asymMatrixConstructorTablePtr_->end()) if (constructorIter == asymMatrixConstructorTablePtr_->end())
{ {
FatalIOErrorIn FatalIOErrorInFunction
( (
"lduMatrix::preconditioner::New"
"(const solver&, const dictionary&)",
controls controls
) << "Unknown asymmetric matrix preconditioner " ) << "Unknown asymmetric matrix preconditioner "
<< name << nl << nl << name << nl << nl
@ -138,10 +134,8 @@ Foam::lduMatrix::preconditioner::New
} }
else else
{ {
FatalIOErrorIn FatalIOErrorInFunction
( (
"lduMatrix::preconditioner::New"
"(const solver&, const dictionary&)",
controls controls
) << "cannot solve incomplete matrix, " ) << "cannot solve incomplete matrix, "
"no diagonal or off-diagonal coefficient" "no diagonal or off-diagonal coefficient"

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -91,10 +91,8 @@ Foam::autoPtr<Foam::lduMatrix::smoother> Foam::lduMatrix::smoother::New
if (constructorIter == symMatrixConstructorTablePtr_->end()) if (constructorIter == symMatrixConstructorTablePtr_->end())
{ {
FatalIOErrorIn FatalIOErrorInFunction(solverControls)
( << "Unknown symmetric matrix smoother "
"lduMatrix::smoother::New", solverControls
) << "Unknown symmetric matrix smoother "
<< name << nl << nl << name << nl << nl
<< "Valid symmetric matrix smoothers are :" << endl << "Valid symmetric matrix smoothers are :" << endl
<< symMatrixConstructorTablePtr_->sortedToc() << symMatrixConstructorTablePtr_->sortedToc()
@ -120,10 +118,8 @@ Foam::autoPtr<Foam::lduMatrix::smoother> Foam::lduMatrix::smoother::New
if (constructorIter == asymMatrixConstructorTablePtr_->end()) if (constructorIter == asymMatrixConstructorTablePtr_->end())
{ {
FatalIOErrorIn FatalIOErrorInFunction(solverControls)
( << "Unknown asymmetric matrix smoother "
"lduMatrix::smoother::New", solverControls
) << "Unknown asymmetric matrix smoother "
<< name << nl << nl << name << nl << nl
<< "Valid asymmetric matrix smoothers are :" << endl << "Valid asymmetric matrix smoothers are :" << endl
<< asymMatrixConstructorTablePtr_->sortedToc() << asymMatrixConstructorTablePtr_->sortedToc()
@ -144,10 +140,8 @@ Foam::autoPtr<Foam::lduMatrix::smoother> Foam::lduMatrix::smoother::New
} }
else else
{ {
FatalIOErrorIn FatalIOErrorInFunction(solverControls)
( << "cannot solve incomplete matrix, "
"lduMatrix::smoother::New", solverControls
) << "cannot solve incomplete matrix, "
"no diagonal or off-diagonal coefficient" "no diagonal or off-diagonal coefficient"
<< exit(FatalIOError); << exit(FatalIOError);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -71,10 +71,8 @@ Foam::autoPtr<Foam::lduMatrix::solver> Foam::lduMatrix::solver::New
if (constructorIter == symMatrixConstructorTablePtr_->end()) if (constructorIter == symMatrixConstructorTablePtr_->end())
{ {
FatalIOErrorIn FatalIOErrorInFunction(solverControls)
( << "Unknown symmetric matrix solver " << name << nl << nl
"lduMatrix::solver::New", solverControls
) << "Unknown symmetric matrix solver " << name << nl << nl
<< "Valid symmetric matrix solvers are :" << endl << "Valid symmetric matrix solvers are :" << endl
<< symMatrixConstructorTablePtr_->sortedToc() << symMatrixConstructorTablePtr_->sortedToc()
<< exit(FatalIOError); << exit(FatalIOError);
@ -100,10 +98,8 @@ Foam::autoPtr<Foam::lduMatrix::solver> Foam::lduMatrix::solver::New
if (constructorIter == asymMatrixConstructorTablePtr_->end()) if (constructorIter == asymMatrixConstructorTablePtr_->end())
{ {
FatalIOErrorIn FatalIOErrorInFunction(solverControls)
( << "Unknown asymmetric matrix solver " << name << nl << nl
"lduMatrix::solver::New", solverControls
) << "Unknown asymmetric matrix solver " << name << nl << nl
<< "Valid asymmetric matrix solvers are :" << endl << "Valid asymmetric matrix solvers are :" << endl
<< asymMatrixConstructorTablePtr_->sortedToc() << asymMatrixConstructorTablePtr_->sortedToc()
<< exit(FatalIOError); << exit(FatalIOError);
@ -124,10 +120,8 @@ Foam::autoPtr<Foam::lduMatrix::solver> Foam::lduMatrix::solver::New
} }
else else
{ {
FatalIOErrorIn FatalIOErrorInFunction(solverControls)
( << "cannot solve incomplete matrix, "
"lduMatrix::solver::New", solverControls
) << "cannot solve incomplete matrix, "
"no diagonal or off-diagonal coefficient" "no diagonal or off-diagonal coefficient"
<< exit(FatalIOError); << exit(FatalIOError);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -293,11 +293,8 @@ Foam::SVD::SVD(const scalarRectangularMatrix& A, const scalar minCondition)
} }
if (its == 34) if (its == 34)
{ {
WarningIn WarningInFunction
( << "no convergence in 35 SVD iterations"
"SVD::SVD"
"(scalarRectangularMatrix& A, const scalar minCondition)"
) << "no convergence in 35 SVD iterations"
<< endl; << endl;
} }

View File

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

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -67,7 +67,7 @@ Foam::vector Foam::cellModel::centre
if (pyrVol > SMALL) if (pyrVol > SMALL)
{ {
WarningIn("cellModel::centre(const labelList&, const pointField&)") WarningInFunction
<< "zero or negative pyramid volume: " << -pyrVol << "zero or negative pyramid volume: " << -pyrVol
<< " for face " << i << " for face " << i
<< endl; << endl;
@ -125,7 +125,7 @@ Foam::scalar Foam::cellModel::mag
if (pyrVol > SMALL) if (pyrVol > SMALL)
{ {
WarningIn("cellModel::mag(const labelList&, const pointField&)") WarningInFunction
<< "zero or negative pyramid volume: " << -pyrVol << "zero or negative pyramid volume: " << -pyrVol
<< " for face " << i << " for face " << i
<< endl; << endl;

View File

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

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -42,7 +42,7 @@ Foam::IOmapDistribute::IOmapDistribute(const IOobject& io)
// Temporary warning // Temporary warning
if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED) if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED)
{ {
WarningIn("IOmapDistribute::IOmapDistribute(const IOobject&)") WarningInFunction
<< "IOmapDistribute " << name() << "IOmapDistribute " << name()
<< " constructed with IOobject::MUST_READ_IF_MODIFIED" << " constructed with IOobject::MUST_READ_IF_MODIFIED"
" but IOmapDistribute does not support automatic rereading." " but IOmapDistribute does not support automatic rereading."
@ -75,7 +75,7 @@ Foam::IOmapDistribute::IOmapDistribute
// Temporary warning // Temporary warning
if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED) if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED)
{ {
WarningIn("IOmapDistribute::IOmapDistribute(const IOobject&)") WarningInFunction
<< "IOmapDistribute " << name() << "IOmapDistribute " << name()
<< " constructed with IOobject::MUST_READ_IF_MODIFIED" << " constructed with IOobject::MUST_READ_IF_MODIFIED"
" but IOmapDistribute does not support automatic rereading." " but IOmapDistribute does not support automatic rereading."
@ -112,7 +112,7 @@ Foam::IOmapDistribute::IOmapDistribute
// Temporary warning // Temporary warning
if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED) if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED)
{ {
WarningIn("IOmapDistribute::IOmapDistribute(const IOobject&)") WarningInFunction
<< "IOmapDistribute " << name() << "IOmapDistribute " << name()
<< " constructed with IOobject::MUST_READ_IF_MODIFIED" << " constructed with IOobject::MUST_READ_IF_MODIFIED"
" but IOmapDistribute does not support automatic rereading." " but IOmapDistribute does not support automatic rereading."

View File

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

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -50,10 +50,8 @@ Foam::autoPtr<Foam::cellZone> Foam::cellZone::New
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
FatalIOErrorIn FatalIOErrorInFunction
( (
"cellZone::New(const word&, const dictionary&, "
"const label, const cellZoneMesh&)",
dict dict
) << "Unknown cellZone type " ) << "Unknown cellZone type "
<< zoneType << nl << nl << zoneType << nl << nl

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -50,10 +50,8 @@ Foam::autoPtr<Foam::faceZone> Foam::faceZone::New
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
FatalIOErrorIn FatalIOErrorInFunction
( (
"faceZone::New(const word&, const dictionary&, "
"const label, const faceZoneMesh&)",
dict dict
) << "Unknown faceZone type " ) << "Unknown faceZone type "
<< zoneType << nl << nl << zoneType << nl << nl

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -50,10 +50,8 @@ Foam::autoPtr<Foam::pointZone> Foam::pointZone::New
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
FatalIOErrorIn FatalIOErrorInFunction
( (
"pointZone::New(const word&, const dictionary&, "
"const label, const pointZoneMesh&)",
dict dict
) << "Unknown pointZone type " ) << "Unknown pointZone type "
<< zoneType << nl << nl << zoneType << nl << nl

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -110,7 +110,7 @@ Foam::PatchTools::sortedPointEdges
nVisitedEdges++; nVisitedEdges++;
if (nVisitedEdges > nPointEdges) if (nVisitedEdges > nPointEdges)
{ {
WarningIn("Foam::PatchTools::sortedPointEdges()") WarningInFunction
<< "Unable to order pointEdges as the face connections " << "Unable to order pointEdges as the face connections "
<< "are not circular" << nl << "are not circular" << nl
<< " Original pointEdges = " << pEdges << nl << " Original pointEdges = " << pEdges << nl
@ -130,7 +130,7 @@ Foam::PatchTools::sortedPointEdges
{ {
if (findIndex(newEdgeList, pEdges[eI]) == -1) if (findIndex(newEdgeList, pEdges[eI]) == -1)
{ {
WarningIn("Foam::PatchTools::sortedPointEdges()") WarningInFunction
<< "Cannot find all original edges in the new list" << "Cannot find all original edges in the new list"
<< nl << nl
<< " Original pointEdges = " << pEdges << nl << " Original pointEdges = " << pEdges << nl

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -42,11 +42,8 @@ Foam::treeBoundBox::treeBoundBox
// points may be empty, but a FixedList is never empty // points may be empty, but a FixedList is never empty
if (points.empty()) if (points.empty())
{ {
WarningIn WarningInFunction
( << "cannot find bounding box for zero-sized pointField, "
"treeBoundBox::treeBoundBox"
"(const UList<point>&, const FixedList<label, Size>&)"
) << "cannot find bounding box for zero-sized pointField, "
<< "returning zero" << endl; << "returning zero" << endl;
return; return;

View File

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

View File

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

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -62,7 +62,7 @@ Foam::Istream& Foam::operator>>(Istream& is, Switch& s)
else else
{ {
is.setBad(); is.setBad();
FatalIOErrorIn("operator>>(Istream&, bool/Switch&)", is) FatalIOErrorInFunction(is)
<< "expected 'true/false', 'on/off' ... found " << t.wordToken() << "expected 'true/false', 'on/off' ... found " << t.wordToken()
<< exit(FatalIOError); << exit(FatalIOError);
@ -72,7 +72,7 @@ Foam::Istream& Foam::operator>>(Istream& is, Switch& s)
else else
{ {
is.setBad(); is.setBad();
FatalIOErrorIn("operator>>(Istream&, bool/Switch&)", is) FatalIOErrorInFunction(is)
<< "wrong token type - expected bool, found " << t << "wrong token type - expected bool, found " << t
<< exit(FatalIOError); << exit(FatalIOError);

View File

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

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -57,7 +57,7 @@ unsigned char Foam::SHA1Digest::readHexDigit(Istream& is)
if (!isxdigit(c)) if (!isxdigit(c))
{ {
FatalIOErrorIn("SHA1Digest::readHexDigit(Istream&)", is) FatalIOErrorInFunction(is)
<< "Illegal hex digit: '" << c << "'" << "Illegal hex digit: '" << c << "'"
<< exit(FatalIOError); << exit(FatalIOError);
} }

View File

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

View File

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

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -59,7 +59,7 @@ Foam::Istream& Foam::operator>>(Istream& is, uint32_t& i)
else else
{ {
is.setBad(); is.setBad();
FatalIOErrorIn("operator>>(Istream&, uint32_t&)", is) FatalIOErrorInFunction(is)
<< "wrong token type - expected uint32_t, found " << t.info() << "wrong token type - expected uint32_t, found " << t.info()
<< exit(FatalIOError); << exit(FatalIOError);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -59,7 +59,7 @@ Foam::Istream& Foam::operator>>(Istream& is, uint64_t& i)
else else
{ {
is.setBad(); is.setBad();
FatalIOErrorIn("operator>>(Istream&, uint64_t&)", is) FatalIOErrorInFunction(is)
<< "wrong token type - expected uint64_t, found " << t.info() << "wrong token type - expected uint64_t, found " << t.info()
<< exit(FatalIOError); << exit(FatalIOError);

View File

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

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -53,7 +53,7 @@ Foam::Istream& Foam::operator>>(Istream& is, fileName& fn)
else else
{ {
is.setBad(); is.setBad();
FatalIOErrorIn("operator>>(Istream&, fileName&)", is) FatalIOErrorInFunction(is)
<< "wrong token type - expected string, found " << t.info() << "wrong token type - expected string, found " << t.info()
<< exit(FatalIOError); << exit(FatalIOError);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -93,7 +93,7 @@ Foam::Istream& Foam::operator>>(Istream& is, keyType& kw)
if (kw.empty()) if (kw.empty())
{ {
is.setBad(); is.setBad();
FatalIOErrorIn("operator>>(Istream&, keyType&)", is) FatalIOErrorInFunction(is)
<< "empty word/expression " << "empty word/expression "
<< exit(FatalIOError); << exit(FatalIOError);
return is; return is;
@ -102,7 +102,7 @@ Foam::Istream& Foam::operator>>(Istream& is, keyType& kw)
else else
{ {
is.setBad(); is.setBad();
FatalIOErrorIn("operator>>(Istream&, keyType&)", is) FatalIOErrorInFunction(is)
<< "wrong token type - expected word or string, found " << "wrong token type - expected word or string, found "
<< t.info() << t.info()
<< exit(FatalIOError); << exit(FatalIOError);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -53,7 +53,7 @@ Foam::Istream& Foam::operator>>(Istream& is, string& s)
else else
{ {
is.setBad(); is.setBad();
FatalIOErrorIn("operator>>(Istream&, string&)", is) FatalIOErrorInFunction(is)
<< "wrong token type - expected string, found " << t.info() << "wrong token type - expected string, found " << t.info()
<< exit(FatalIOError); << exit(FatalIOError);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -60,7 +60,7 @@ Foam::Istream& Foam::operator>>(Istream& is, word& w)
if (w.empty() || w.size() != t.stringToken().size()) if (w.empty() || w.size() != t.stringToken().size())
{ {
is.setBad(); is.setBad();
FatalIOErrorIn("operator>>(Istream&, word&)", is) FatalIOErrorInFunction(is)
<< "wrong token type - expected word, found " << "wrong token type - expected word, found "
"non-word characters " "non-word characters "
<< t.info() << t.info()
@ -71,7 +71,7 @@ Foam::Istream& Foam::operator>>(Istream& is, word& w)
else else
{ {
is.setBad(); is.setBad();
FatalIOErrorIn("operator>>(Istream&, word&)", is) FatalIOErrorInFunction(is)
<< "wrong token type - expected word, found " << "wrong token type - expected word, found "
<< t.info() << t.info()
<< exit(FatalIOError); << exit(FatalIOError);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -68,7 +68,7 @@ Foam::Istream& Foam::operator>>(Istream& is, wordRe& w)
if (w.empty()) if (w.empty())
{ {
is.setBad(); is.setBad();
FatalIOErrorIn("operator>>(Istream&, wordRe&)", is) FatalIOErrorInFunction(is)
<< "empty word/expression " << "empty word/expression "
<< exit(FatalIOError); << exit(FatalIOError);
return is; return is;
@ -77,7 +77,7 @@ Foam::Istream& Foam::operator>>(Istream& is, wordRe& w)
else else
{ {
is.setBad(); is.setBad();
FatalIOErrorIn("operator>>(Istream&, wordRe&)", is) FatalIOErrorInFunction(is)
<< "wrong token type - expected word or string, found " << "wrong token type - expected word or string, found "
<< t.info() << t.info()
<< exit(FatalIOError); << exit(FatalIOError);