Skip to content
Snippets Groups Projects
Commit bcb22679 authored by Mark OLESEN's avatar Mark OLESEN
Browse files

ENH: reduce verbosity of safe warning (fixes #881)

- in places where we use std::cerr instead or Warning or FatalError.
  We only want messages from one process though.
parent e769daf9
No related merge requests found
...@@ -24,6 +24,7 @@ License ...@@ -24,6 +24,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "dictionary.H" #include "dictionary.H"
#include "Pstream.H"
// * * * * * * * * * * * * * * * Local Functions * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Local Functions * * * * * * * * * * * * * * //
...@@ -65,7 +66,14 @@ Foam::dictionary::const_searcher Foam::dictionary::csearchCompat ...@@ -65,7 +66,14 @@ Foam::dictionary::const_searcher Foam::dictionary::csearchCompat
if (finder.found()) if (finder.found())
{ {
if (shouldWarnVersion(iter.second)) // Only want a single warning (on master), but guard with a
// parRun check to avoid Pstream::master() when Pstream has not
// yet been initialized
if
(
shouldWarnVersion(iter.second)
&& (Pstream::parRun() ? Pstream::master() : true)
)
{ {
std::cerr std::cerr
<< "--> FOAM IOWarning :" << nl << "--> FOAM IOWarning :" << nl
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment