ENH: Updated Info, Warning and Error messages

This commit is contained in:
Andrew Heather
2015-12-08 11:15:39 +00:00
parent ae95edeea4
commit eafd5a3850
94 changed files with 351 additions and 1040 deletions

View File

@ -300,7 +300,7 @@ void determineDecomposition
if (!decomposer.parallelAware())
{
WarningIn("determineDecomposition(..)")
WarningInFunction
<< "You have selected decomposition method "
<< decomposer.typeName
<< " which does" << endl
@ -543,11 +543,8 @@ void writeProcAddressing
if (!cellOk || !faceOk || !pointOk || !patchOk)
{
WarningIn
(
"void writeProcAddressing"
"(const bool, const fvMesh&, const mapDistributePolyMesh&)"
) << "Failed to write " << cellMap.objectPath()
WarningInFunction
<< "Failed to write " << cellMap.objectPath()
<< ", " << faceMap.objectPath()
<< ", " << pointMap.objectPath()
<< ", " << patchMap.objectPath()
@ -785,7 +782,7 @@ void correctCoupledBoundaryConditions(fvMesh& mesh)
}
else
{
FatalErrorIn("correctCoupledBoundaryConditions()")
FatalErrorInFunction
<< "Unsuported communications type "
<< Pstream::commsTypeNames[Pstream::defaultCommsType]
<< exit(FatalError);
@ -865,7 +862,7 @@ autoPtr<mapDistributePolyMesh> redistributeAndWrite
if (nonProcI == -1)
{
FatalErrorIn("redistributeAndWrite(..)")
FatalErrorInFunction
<< "Cannot find non-processor patch on processor "
<< Pstream::myProcNo() << endl
<< " Current patches:" << patches.names()
@ -1508,11 +1505,8 @@ void readProcAddressing
|| mesh.boundaryMesh().size() != boundaryProcAddressing.size()
)
{
FatalErrorIn
(
"readProcAddressing(const fvMesh&, const autoPtr<fvMesh>&,"
"autoPtr<mapDistributePolyMesh>&"
) << "Read addressing inconsistent with mesh sizes" << nl
FatalErrorInFunction
<< "Read addressing inconsistent with mesh sizes" << nl
<< "cells:" << mesh.nCells()
<< " addressing:" << cellProcAddressing.objectPath()
<< " size:" << cellProcAddressing.size() << nl
@ -2173,7 +2167,7 @@ int main(int argc, char *argv[])
if (env("FOAM_SIGFPE"))
{
WarningIn(args.executable())
WarningInFunction
<< "Detected floating point exception trapping (FOAM_SIGFPE)."
<< " This might give" << nl
<< " problems when mapping fields. Switch it off in case"
@ -2191,7 +2185,7 @@ int main(int argc, char *argv[])
Info<< "Decomposing case (like decomposePar)" << nl << endl;
if (reconstruct)
{
FatalErrorIn(args.executable())
FatalErrorInFunction
<< "Cannot specify both -decompose and -reconstruct"
<< exit(FatalError);
}
@ -2206,7 +2200,7 @@ int main(int argc, char *argv[])
{
if (!overwrite)
{
WarningIn(args.executable())
WarningInFunction
<< "Working in decompose or reconstruction mode automatically"
<< " implies -overwrite" << nl << endl;
overwrite = true;
@ -2216,7 +2210,7 @@ int main(int argc, char *argv[])
if (!Pstream::parRun())
{
FatalErrorIn(args.executable())
FatalErrorInFunction
<< ": This utility can only be run parallel"
<< exit(FatalError);
}
@ -2224,7 +2218,7 @@ int main(int argc, char *argv[])
if (!isDir(args.rootPath()))
{
FatalErrorIn(args.executable())
FatalErrorInFunction
<< ": cannot open root directory " << args.rootPath()
<< exit(FatalError);
}
@ -2375,7 +2369,7 @@ int main(int argc, char *argv[])
if (timeDirs.empty())
{
FatalErrorIn(args.executable())
FatalErrorInFunction
<< "No times selected"
<< exit(FatalError);
}