diff --git a/src/OpenFOAM/db/error/messageStream.C b/src/OpenFOAM/db/error/messageStream.C index afec263908..75ae1b4770 100644 --- a/src/OpenFOAM/db/error/messageStream.C +++ b/src/OpenFOAM/db/error/messageStream.C @@ -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; - } - 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 operator()(); + } + else + { + return Snull; } - - return Snull; }