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,39 +188,14 @@ Foam::OSstream& Foam::messageStream::operator()
|
||||
|
||||
Foam::OSstream& Foam::messageStream::operator()(const bool output)
|
||||
{
|
||||
if (level)
|
||||
if (output)
|
||||
{
|
||||
bool collect = (severity_ == INFO || severity_ == WARNING);
|
||||
|
||||
// Report the error
|
||||
if (!output && collect)
|
||||
{
|
||||
return Snull;
|
||||
return operator()();
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user