mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: messageStream - updated output when using (bool) operator
This commit is contained in:
@ -188,40 +188,15 @@ Foam::OSstream& Foam::messageStream::operator()
|
|||||||
|
|
||||||
Foam::OSstream& Foam::messageStream::operator()(const bool output)
|
Foam::OSstream& Foam::messageStream::operator()(const bool output)
|
||||||
{
|
{
|
||||||
if (level)
|
if (output)
|
||||||
{
|
{
|
||||||
bool collect = (severity_ == INFO || severity_ == WARNING);
|
return operator()();
|
||||||
|
|
||||||
// Report the error
|
|
||||||
if (!output && collect)
|
|
||||||
{
|
|
||||||
return Snull;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (title().size())
|
|
||||||
{
|
|
||||||
Pout<< title().c_str();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (maxErrors_)
|
|
||||||
{
|
|
||||||
errorCount_++;
|
|
||||||
|
|
||||||
if (errorCount_ >= maxErrors_)
|
|
||||||
{
|
|
||||||
FatalErrorIn("messageStream::operator OSstream&()")
|
|
||||||
<< "Too many errors"
|
|
||||||
<< abort(FatalError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return Pout;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return Snull;
|
return Snull;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::messageStream::operator Foam::OSstream&()
|
Foam::messageStream::operator Foam::OSstream&()
|
||||||
|
|||||||
Reference in New Issue
Block a user