Commit 271e2b8e authored by Andrew Heather's avatar Andrew Heather
Browse files

ENH: Updated Info, Warning and Error messages

parent 3b9e2cf6
......@@ -407,19 +407,7 @@ void Foam::fieldVisualisationBase::addGlyphs
}
else
{
WarningIn
(
"void Foam::fieldVisualisationBase::addGlyphs"
"("
"const scalar, "
"const word&, "
"const word&, "
"const scalar, "
"vtkPolyData*, "
"vtkActor*, "
"vtkRenderer*"
") const"
)
WarningInFunction
<< "Glyphs can only be added to " << pTraits<scalar>::typeName
<< " and " << pTraits<vector>::typeName << " fields. "
<< " Field " << scaleFieldName << " has " << nComponents
......
......@@ -102,14 +102,7 @@ void Foam::functionObjectCloud::addGeometryToScene
if (fName.empty())
{
WarningIn
(
"void Foam::functionObjectCloud::addToScene"
"("
"const scalar, "
"vtkRenderer*"
")"
)
WarningInFunction
<< "Unable to find function object " << functionObject_
<< " output for field " << fieldName_
<< ". Line will not be processed"
......
......@@ -93,14 +93,7 @@ void Foam::functionObjectLine::addGeometryToScene
fileName fName;
if (!dict.readIfPresent("file", fName))
{
WarningIn
(
"void Foam::functionObjectLine::addToScene"
"("
"const scalar, "
"vtkRenderer*"
")"
)
WarningInFunction
<< "Unable to find function object " << functionObject_
<< " output for field " << fieldName_
<< ". Line will not be processed"
......
......@@ -95,14 +95,7 @@ void Foam::functionObjectSurface::addGeometryToScene
fileName fName;
if (!dict.readIfPresent("file", fName))
{
WarningIn
(
"void Foam::functionObjectSurface::addToScene"
"("
"const scalar, "
"vtkRenderer*"
")"
)
WarningInFunction
<< "Unable to find function object " << functionObject_
<< " output for field " << fieldName_
<< ". Surface will not be processed"
......
......@@ -64,15 +64,7 @@ void Foam::geometrySurface::addGeometryToScene
{
if (representation_ == rtGlyph)
{
FatalErrorIn
(
"void Foam::geometrySurface::addGeometryToScene"
"("
"const label, "
"vtkRenderer*, "
"const fileName&"
") const"
)
FatalErrorInFunction
<< "Glyph representation not available for " << typeName
<< "object" << exit(FatalError);
}
......
......@@ -182,16 +182,8 @@ Foam::autoPtr<Foam::pathline> Foam::pathline::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"Foam::autoPtr<Foam::pathline> Foam::pathline::New"
"("
"const runTimePostProcessing&, "
"const dictionary&, "
"const HashPtrTable<DataEntry<vector>, word>&, "
"const word&"
")"
) << "Unknown pathline type "
FatalErrorInFunction
<< "Unknown pathline type "
<< pathlineType << nl << nl
<< "Valid pathline types are:" << endl
<< dictionaryConstructorTablePtr_->sortedToc()
......
......@@ -142,16 +142,8 @@ Foam::autoPtr<Foam::pointData> Foam::pointData::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"Foam::autoPtr<Foam::pointData> Foam::pointData::New"
"("
"const runTimePostProcessing&, "
"const dictionary&, "
"const HashPtrTable<DataEntry<vector>, word>&, "
"const word&"
")"
) << "Unknown pointData type "
FatalErrorInFunction
<< "Unknown pointData type "
<< pointDataType << nl << nl
<< "Valid pointData types are:" << endl
<< dictionaryConstructorTablePtr_->sortedToc()
......
......@@ -102,11 +102,7 @@ void Foam::runTimePostProcessing::read(const dictionary& dict)
{
if (!iter().isDict())
{
FatalIOErrorIn
(
"void Foam::runTimePostProcessing::read(const dictionary&)",
textDict
)
FatalIOErrorInFunction(textDict)
<< "text must be specified in dictionary format"
<< exit(FatalIOError);
}
......
......@@ -37,15 +37,7 @@ void Foam::runTimePostProcessing::readObjects
{
if (!iter().isDict())
{
FatalIOErrorIn
(
"void Foam::runTimePostProcessing::readObjects"
"("
"const dictionary&, "
"PtrList<Type>&"
")",
dict
)
FatalIOErrorInFunction(dict)
<< dict.dictName()
<< " objects must be specified in dictionary format"
<< exit(FatalIOError);
......
......@@ -61,11 +61,8 @@ void Foam::scene::readCamera(const dictionary& dict)
{
if (nFrameTotal_ < 1)
{
FatalIOErrorIn
(
"void Foam::scene::readCamera(const dictionary&)",
dict
) << "nFrameTotal must be 1 or greater"
FatalIOErrorInFunction(dict)
<< "nFrameTotal must be 1 or greater"
<< exit(FatalIOError);
}
}
......@@ -74,11 +71,8 @@ void Foam::scene::readCamera(const dictionary& dict)
{
if ((position_ < 0) || (position_ > 1))
{
FatalIOErrorIn
(
"void Foam::scene::readCamera(const dictionary&)",
dict
) << "startPosition must be in the range 0-1"
FatalIOErrorInFunction(dict)
<< "startPosition must be in the range 0-1"
<< exit(FatalIOError);
}
}
......@@ -91,11 +85,8 @@ void Foam::scene::readCamera(const dictionary& dict)
scalar endPosition = dict.lookupOrDefault<scalar>("endPosition", 1);
if ((endPosition < 0) || (endPosition > 1))
{
FatalIOErrorIn
(
"void Foam::scene::readCamera(const dictionary&)",
dict
) << "endPosition must be in the range 0-1"
FatalIOErrorInFunction(dict)
<< "endPosition must be in the range 0-1"
<< exit(FatalIOError);
}
dPosition_ = (endPosition - position_)/scalar(nFrameTotal_ - 1);
......@@ -137,7 +128,7 @@ void Foam::scene::readCamera(const dictionary& dict)
}
default:
{
FatalErrorIn("void Foam::scene::read(const dictionary&)")
FatalErrorInFunction
<< "Unhandled enumeration " << modeTypeNames_[mode_]
<< abort(FatalError);
}
......
......@@ -205,16 +205,8 @@ Foam::autoPtr<Foam::surface> Foam::surface::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"Foam::autoPtr<Foam::surface> Foam::surface::New"
"("
"const runTimePostProcessing&, "
"const dictionary&, "
"const HashPtrTable<DataEntry<vector>, word>&, "
"const word&"
")"
) << "Unknown surface type "
FatalErrorInFunction
<< "Unknown surface type "
<< surfaceType << nl << nl
<< "Valid surface types are:" << endl
<< dictionaryConstructorTablePtr_->sortedToc()
......
Markdown is supported
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