OpenFOAM logo
Open Source CFD Toolkit

error.H File Reference


Detailed Description

View error.H
License
This file is part of OpenFOAM.

OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.

OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
for more details.

You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
Class to handle errors and exceptions in a simple, consistent stream-based
manner.  The error class is globaly instantiated with a title string.
Errors, messages and other data are piped to the messageStream class in the
standard manner.   Manipulators are supplied for exit and abort which may
terminate the program or throw an exception depending of if the exception
 handling has beed switched on (off by default).

Usage
error << "message1" << "message2" << FoamDataType << exit(errNo);
error << "message1" << "message2" << FoamDataType << abort();

Source files

Definition in file error.H.

Go to the source code of this file.

Namespaces

namespace  Foam

Classes

class  error
class  IOerror

Defines

#define FatalErrorIn(fn)   FatalError(fn, __FILE__, __LINE__)
#define FatalIOErrorIn(fn, ios)   FatalIOError(fn, __FILE__, __LINE__, ios)
#define notImplemented(fn)   FatalErrorIn(fn) << "Not implemented" << Foam::abort(FatalError);

Variables

error FatalError
IOerror FatalIOError


Define Documentation

#define FatalErrorIn fn   )     FatalError(fn, __FILE__, __LINE__)
 

Definition at line 284 of file error.H.

Referenced by autoPtr::clear(), VectorSpace::component(), coupledPolyPatch::coupled(), pointHit::distance(), tetCell::edgeFace(), edgeVertex::edgeVertex(), tetCell::face(), calculatedFaPatchField::fixesValue(), edgeVertex::getEdge(), edgeVertex::getVertex(), calculatedFaPatchField::gradientInternalCoeffs(), pointHit::hit(), PtrList::hook(), if(), pointIndexHit::index(), treeLeaf::indices(), edgeVertex::isEdge(), treeNode::isNode(), edgeSurface::isSurfaceEdge(), autoPtr::operator const T &(), MapInternalField< Type, MeshMapper, tetPointMesh >::operator()(), MapInternalField< Type, MeshMapper, elementMesh >::operator()(), tmp::operator()(), MapInternalField< Type, MeshMapper, volMesh >::operator()(), MapInternalField< Type, MeshMapper, surfaceMesh >::operator()(), tmp::operator->(), tmp::operator=(), VectorSpace::operator[](), StaticHashTable::operator[](), HashTable::operator[](), coupledPolyPatch::parallel(), coupledFaPatch::parallel(), polyAddFace::polyAddFace(), polyAddPoint::polyAddPoint(), polyModifyFace::polyModifyFace(), tmp::ptr(), UList::rcIndex(), FixedList::rcIndex(), VectorSpace::replace(), coupledFaPatch::separated(), coupledPolyPatch::separation(), intersection::setPlanarTol(), Matrix::size(), SLListBase::size(), DLListBase::size(), specieThermo::specieThermo(), tetCell::tetEdge(), thirdBodyEfficiencies::thirdBodyEfficiencies(), tmp::tmp(), edgeVertex::vertToEVert(), and FieldMapper::~FieldMapper().

#define FatalIOErrorIn fn,
ios   )     FatalIOError(fn, __FILE__, __LINE__, ios)
 

Definition at line 285 of file error.H.

Referenced by CrankNicholsonDdtScheme::CrankNicholsonDdtScheme(), limitedGrad::limitedGrad(), and limitedSnGrad::limitedSnGrad().

#define notImplemented fn   )     FatalErrorIn(fn) << "Not implemented" << Foam::abort(FatalError);
 

Definition at line 289 of file error.H.

Referenced by TetPointPatchField< tetPolyPatchField, tetPolyPatch, Type >::addDiag(), TetPointPatchField< tetPolyPatchField, tetPolyPatch, Type >::addSource(), mapAddedPolyMesh::cellMap(), basicThermo::Cp(), objectRegistry::dbDir(), hConstThermo::h(), eConstThermo::h(), basicThermo::h(), harmonic::harmonic(), TetPointPatchField< tetPolyPatchField, tetPolyPatch, Type >::initAddField(), fvPatchField::initEvaluate(), faPatchField::initEvaluate(), localMax::localMax(), localMin::localMin(), polyBoundaryMeshEntries::polyBoundaryMeshEntries(), basicThermo::rho(), lduCoupledInterface::updateInterfaceMatrix(), and faPatchField::valueInternalCoeffs().


Variable Documentation

error FatalError
 

Referenced by autoPtr::clear(), VectorSpace::component(), coupledPolyPatch::coupled(), tetCell::edgeFace(), tetCell::face(), edgeVertex::getEdge(), edgeVertex::getVertex(), calculatedFaPatchField::gradientInternalCoeffs(), PtrList::hook(), pointIndexHit::index(), edgeVertex::isEdge(), treeNode::isNode(), autoPtr::operator const T &(), MapInternalField< Type, MeshMapper, tetPointMesh >::operator()(), MapInternalField< Type, MeshMapper, elementMesh >::operator()(), tmp::operator()(), MapInternalField< Type, MeshMapper, volMesh >::operator()(), MapInternalField< Type, MeshMapper, surfaceMesh >::operator()(), tmp::operator->(), tmp::operator=(), VectorSpace::operator[](), StaticHashTable::operator[](), HashTable::operator[](), coupledFaPatch::parallel(), polyAddFace::polyAddFace(), polyAddPoint::polyAddPoint(), polyModifyFace::polyModifyFace(), tmp::ptr(), VectorSpace::replace(), coupledFaPatch::separated(), coupledPolyPatch::separation(), SLListBase::size(), DLListBase::size(), specieThermo::specieThermo(), tetCell::tetEdge(), thirdBodyEfficiencies::thirdBodyEfficiencies(), tmp::tmp(), edgeVertex::vertToEVert(), and FieldMapper::~FieldMapper().

IOerror FatalIOError
 

Referenced by limitedGrad::limitedGrad().

For further information go to www.openfoam.org