Exception.hpp File Reference

#include <string>
#include <sstream>
#include <cfloat>
#include <climits>
#include <cstdlib>
#include <boost/preprocessor/stringize.hpp>
Include dependency graph for Exception.hpp:

Go to the source code of this file.

Classes

class  Exception

Defines

#define EXCEPTION(message)
#define EXCEPT_IF_NOT(test)   if (!(test)) EXCEPTION("Assertion tripped: " BOOST_PP_STRINGIZE(test))
#define TERMINATE(message)
#define NEVER_REACHED   TERMINATE("Should have been impossible to reach this line of code"); exit(EXIT_FAILURE)
#define UNUSED_OPT(var)
#define ABORT_IF_THROWS(block)
#define EXPECT0(cmd, arg)
#define ABORT_IF_NON0_WITH_MSG(retcode, msg)
#define ABORT_IF_NON0(cmd, arg)
#define EXPECT_NON0(cmd, arg)
#define IGNORE_RET(cmd, arg)

Variables

const unsigned UNSIGNED_UNSET = UINT_MAX
const int INT_UNSET = INT_MAX
const double DOUBLE_UNSET = DBL_MAX

Detailed Description

Contains the Exception class, along with some macros that are widely used throughout the code.

Definition in file Exception.hpp.


Define Documentation

#define ABORT_IF_NON0 ( cmd,
arg   ) 
Value:
{ \
    std::string _arg(arg);        \
    int ret = cmd(_arg.c_str());  \
    ABORT_IF_NON0_WITH_MSG(ret, "Error executing command: " #cmd "(" + _arg + ")") \
    }
Note:
This macro is deprecated, and no longer used by core code.

Handy for calling functions like system which return non-zero on error. Terminate if an error occurs.

This macro should be used instead of EXPECT0 within blocks that are only executed by one process, but need to kill all processes if an error occurs.

Parameters:
cmd command to call
arg its argument (will be converted to std::string)

Definition at line 287 of file Exception.hpp.

#define ABORT_IF_NON0_WITH_MSG ( retcode,
msg   ) 
Value:
if (retcode != 0) {                          \
        TERMINATE(msg);                          \
    }
Note:
This macro is deprecated, and no longer used by core code.

Handy for calling functions like system which return non-zero on error. Terminate if the return code is non-zero, printing a suitable message.

Parameters:
retcode command return code
msg error message to display

Definition at line 270 of file Exception.hpp.

#define ABORT_IF_THROWS ( block   ) 
Value:
try {                               \
        block;                          \
    } catch (const Exception& e) {      \
        TERMINATE(e.GetMessage());      \
    } catch (const std::exception &e) { \
        TERMINATE(e.what());            \
    } catch (...) {                     \
        TERMINATE("Unexpected exception thrown."); \
    }

Convenience function to convert an exception thrown by a single process into termination of the entire program.

Parameters:
block the block of code to execute

Definition at line 225 of file Exception.hpp.

Referenced by OutputDirectoryFifoQueue::CreateNextDir(), and AbstractTetrahedralMesh< SPACE_DIM, SPACE_DIM >::save().

#define EXCEPT_IF_NOT ( test   )     if (!(test)) EXCEPTION("Assertion tripped: " BOOST_PP_STRINGIZE(test))
#define EXCEPTION ( message   ) 
Value:
do {                                             \
        std::stringstream msg_stream;                \
        msg_stream << message;                       \
        throw Exception(msg_stream.str(), __FILE__, __LINE__); \
    } while (false)

Convenience macro for throwing an exception, in order to add file and line info.

Parameters:
message the error message to use, as a streamed expression

Definition at line 143 of file Exception.hpp.

Referenced by AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::AbstractCardiacProblem(), AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::AbstractCardiacTissue(), AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::AbstractCellPopulation(), AbstractContinuumMechanicsAssembler< DIM, true, true >::AbstractContinuumMechanicsAssembler(), AbstractContinuumMechanicsSolver< DIM >::AbstractContinuumMechanicsSolver(), CaBasedCellPopulation< DIM >::AddCellUsingLocationIndex(), VertexCryptBoundaryForce< DIM >::AddForceContribution(), LinearSpringWithVariableSpringConstantsForce< DIM >::AddForceContribution(), CryptProjectionForce::AddForceContribution(), WelikyOsterForce< DIM >::AddForceContribution(), RepulsionForce< DIM >::AddForceContribution(), NagaiHondaForce< DIM >::AddForceContribution(), FarhadifarForce< DIM >::AddForceContribution(), AbstractTwoBodyInteractionForce< ELEMENT_DIM, SPACE_DIM >::AddForceContribution(), QuadraticMeshHelper< DIM >::AddNodesToBoundaryElements(), CellBasedPdeHandler< DIM >::AddPdeAndBc(), CellPropertyCollection::AddProperty(), AbstractCardiacCell::AdjustOutOfRangeSlowValues(), RungeKuttaFehlbergIvpOdeSolver::AdjustStepSize(), Hdf5DataWriter::AdvanceAlongUnlimitedDimension(), TimeStepper::AdvanceOneTimeStep(), BidomainProblem< DIM >::AnalyseMeshForBath(), Hdf5DataWriter::ApplyPermutation(), ArchiveOpener< Archive, Stream >::ArchiveOpener(), AxisymmetricConductivityTensors< ELEMENT_DIM, SPACE_DIM >::AxisymmetricConductivityTensors(), CaBasedCellPopulation< DIM >::CaBasedCellPopulation(), AbstractFunctionalCalculator< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Calculate(), PropagationPropertiesCalculator::CalculateActionPotentialDuration(), CellProperties::CalculateActionPotentialDurations(), NhsModelWithBackwardSolver::CalculateCaTropAndZDerivatives(), DistributedBoxCollection< DIM >::CalculateContainingBox(), BoxCollection< DIM >::CalculateContainingBox(), CalculateEigenvectorForSmallestNonzeroEigenvalue(), AbstractTetrahedralElement< ELEMENT_DIM, SPACE_DIM >::CalculateJacobian(), AbstractTetrahedralElement< ELEMENT_DIM, SPACE_DIM >::CalculateNormal(), CellProperties::CalculateProperties(), AbstractTetrahedralElement< ELEMENT_DIM, SPACE_DIM >::CalculateWeightedDirection(), CardiacSimulation::CardiacSimulation(), Cell::Cell(), ChasteCuboid< SPACE_DIM >::ChasteCuboid(), ChasteEllipsoid< SPACE_DIM >::ChasteEllipsoid(), SloughingCellKiller< DIM >::CheckAndLabelCellsForApoptosisOrDeath(), SolidMechanicsProblemDefinition< DIM >::CheckCastSuccess(), AbstractExtendedBidomainSolver< ELEMENT_DIM, SPACE_DIM >::CheckCompatibilityCondition(), AbstractBidomainSolver< ELEMENT_DIM, SPACE_DIM >::CheckCompatibilityCondition(), CellProperties::CheckExceededThreshold(), ColumnDataReader::CheckFiles(), ElectrodesStimulusFactory< DIM >::CheckForElectrodesIntersection(), XmlTransforms::CheckForIluPreconditioner(), Node< SPACE_DIM >::CheckForNodeAttributes(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::CheckOutwardNormals(), AbstractParameterisedSystem< VECTOR >::CheckParametersOnLoad(), HeartConfig::CheckResumeSimulationIsDefined(), CellProperties::CheckReturnedToThreshold(), HeartConfig::CheckSimulationIsDefined(), HeartConfig::CheckTimeSteps(), Hdf5DataWriter::CheckUnitsName(), ColumnDataWriter::CheckUnitsName(), Hdf5DataWriter::CheckVariableName(), ColumnDataWriter::CheckVariableName(), CmguiDeformedSolutionsWriter< DIM >::CmguiDeformedSolutionsWriter(), ColumnDataReader::ColumnDataReader(), ColumnDataWriter::ColumnDataWriter(), Hdf5DataReader::CommonConstructor(), OutputFileHandler::CommonConstructor(), CompressibleNonlinearElasticitySolver< DIM >::CompressibleNonlinearElasticitySolver(), FineCoarseMeshPair< DIM >::ComputeCoarseElementsForFineElementCentroids(), FineCoarseMeshPair< DIM >::ComputeCoarseElementsForFineNodes(), AbstractParameterisedSystem< VECTOR >::ComputeDerivedQuantities(), Electrodes< DIM >::ComputeElectrodesAreasAndCheckEquality(), FineCoarseMeshPair< DIM >::ComputeFineElementsAndWeightsForCoarseNodes(), FineCoarseMeshPair< DIM >::ComputeFineElementsAndWeightsForCoarseQuadPoints(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ComputeMeshPartitioning(), PoleZeroMaterialLaw< DIM >::ComputeStressAndStressDerivative(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ConstructCuboid(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ConstructFromMeshReader(), DistributedQuadraticMesh< DIM >::ConstructFromMeshReader(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ConstructLinearMesh(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ConstructRectangularMesh(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ConstructRegularSlabMesh(), ContinuumMechanicsNeumannBcsAssembler< DIM >::ContinuumMechanicsNeumannBcsAssembler(), CellMLToSharedLibraryConverter::Convert(), CellMLToSharedLibraryConverter::ConvertCellmlToSo(), CmguiDeformedSolutionsWriter< DIM >::ConvertOutput(), OutputFileHandler::CopyFileTo(), FileFinder::CopyTo(), CreateElectricsProblem< DIM, 2u >::Create(), CreateElectricsProblem< DIM, 1u >::Create(), HeartConfigRelatedCellFactory< SPACE_DIM >::CreateCellWithIntracellularStimulus(), AbstractNonlinearElasticitySolver< DIM >::CreateCmguiOutput(), AbstractContinuumMechanicsSolver< DIM >::CreateVtkOutput(), CryptSimulation2d::CryptSimulation2d(), CvodeAdaptor::CvodeError(), AbstractCvodeSystem::CvodeError(), AbstractCellProperty::DecrementCellCount(), Hdf5DataWriter::DefineFixedDimension(), ColumnDataWriter::DefineFixedDimension(), Hdf5DataWriter::DefineFixedDimensionUsingMatrix(), Hdf5DataWriter::DefineUnlimitedDimension(), ColumnDataWriter::DefineUnlimitedDimension(), Hdf5DataWriter::DefineVariable(), ColumnDataWriter::DefineVariable(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::DeleteBoundaryNodeAt(), NodesOnlyMesh< SPACE_DIM >::DeleteNode(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::DeleteNode(), HeartGeometryInformation< SPACE_DIM >::DetermineLayerForEachNode(), PottsMesh< DIM >::DivideElement(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::DivideElementAlongGivenAxis(), ColumnDataWriter::DoAdvanceAlongUnlimitedDimension(), AbstractFeVolumeIntegralAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, CAN_ASSEMBLE_VECTOR, CAN_ASSEMBLE_MATRIX, INTERPOLATION_LEVEL >::DoAssemble(), AbstractFeCableIntegralAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, CAN_ASSEMBLE_VECTOR, CAN_ASSEMBLE_MATRIX, INTERPOLATION_LEVEL >::DoAssemble(), ContinuumMechanicsNeumannBcsAssembler< DIM >::DoAssemble(), AbstractContinuumMechanicsAssembler< DIM, CAN_ASSEMBLE_VECTOR, CAN_ASSEMBLE_MATRIX >::DoAssemble(), NodePartitioner< ELEMENT_DIM, SPACE_DIM >::DumbPartitioning(), DynamicCellModelLoader::DynamicCellModelLoader(), ElectrodesStimulusFactory< DIM >::ElectrodesStimulusFactory(), Hdf5DataWriter::EndDefineMode(), ColumnDataWriter::EndDefineMode(), GenericEventHandler< 11, MeshEventHandler >::EndEventImpl(), AbstractCvodeSystem::EvaluateAnalyticJacobian(), VolumeConstraintPottsUpdateRule< DIM >::EvaluateHamiltonianContribution(), SurfaceAreaConstraintPottsUpdateRule< DIM >::EvaluateHamiltonianContribution(), AdhesionPottsUpdateRule< DIM >::EvaluateHamiltonianContribution(), NhsContractionModel::EvaluateYDerivatives(), ExponentialMaterialLaw< DIM >::ExponentialMaterialLaw(), ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >::ExtendedBidomainSolver(), FibreReader< DIM >::FibreReader(), FileFinder::FindMatches(), AbstractCvodeSystem::ForceUseOfNumericalJacobian(), AbstractGeneralizedRushLarsenCardiacCell::ForceUseOfNumericalJacobian(), GaussianQuadratureRule< ELEMENT_DIM >::GaussianQuadratureRule(), GaussianQuadratureRule< 1 >::GaussianQuadratureRule(), CellsGenerator< CELL_CYCLE_MODEL, DIM >::GenerateBasic(), NodePartitioner< ELEMENT_DIM, SPACE_DIM >::GeometricPartitioning(), ProcessSpecificArchive< Archive >::Get(), HeartConfig::GetAbsoluteTolerance(), ImplicitCardiacMechanicsSolver< ELASTICITY_SOLVER, DIM >::GetActiveTensionAndTensionDerivs(), FibreReader< DIM >::GetAllAxi(), FibreReader< DIM >::GetAllOrtho(), TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetAngleBetweenNodes(), AbstractParameterisedSystem< VECTOR >::GetAnyVariable(), AbstractOdeSystemInformation::GetAnyVariableIndex(), AbstractOdeSystemInformation::GetAnyVariableUnits(), ParallelCellsGenerator< CELL_CYCLE_MODEL, DIM >::GetArchiveBoundingBox(), ArchiveLocationInfo::GetArchiveDirectory(), PottsElement< DIM >::GetAspectRatio(), AbstractOdeSystemInformation::GetAttribute(), AbstractNonlinearElasticitySolver< DIM >::GetAverageStressPerElement(), CommandLineArguments::GetBoolCorrespondingToOption(), MixedDimensionMesh< ELEMENT_DIM, SPACE_DIM >::GetCableElement(), AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::GetCardiacCellOrHaloCell(), VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetCellData(), HeartConfig::GetCellHeterogeneities(), CellId::GetCellId(), AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetCellUsingLocationIndex(), HoneycombMeshGenerator::GetCircularMesh(), HeartConfig::GetConductivityHeterogeneities(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetContainingElementIndex(), TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetContainingElementIndexWithInitialGuess(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetContainingElementIndices(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetContainingElementIndices(), VertexBasedCellPopulation< DIM >::GetDampingConstant(), AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::GetDataReader(), AbstractOdeSystemInformation::GetDerivedQuantityIndex(), AbstractOdeSystemInformation::GetDerivedQuantityUnits(), VertexMesh< ELEMENT_DIM, SPACE_DIM >::GetEdgeLength(), HeartConfig::GetElectrodeParameters(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetElementData(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetElementData(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetFaceData(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetFaceData(), HeartConfig::GetFibreLength(), FibreReader< DIM >::GetFibreSheetAndNormalMatrix(), FibreReader< DIM >::GetFibreVector(), AbstractCardiacCellFactory< ELEMENT_DIM, SPACE_DIM >::GetHeartGeometryInformation(), CommandLineArguments::GetIndexForArgument(), PseudoEcgCalculator< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::GetIntegrand(), AbstractCardiacCellInterface::GetIntracellularCalciumConcentration(), HeartConfig::GetIonicModelRegions(), CellData::GetItem(), NonCachedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetJacobianForElement(), HeartConfig::GetKSPPreconditioner(), HeartConfig::GetKSPSolver(), CellProperties::GetLastCompleteMaxUpstrokeVelocity(), CellProperties::GetLastCompletePeakPotential(), CellId::GetMaxCellId(), ToroidalHoneycombVertexMeshGenerator::GetMesh(), CylindricalHoneycombVertexMeshGenerator::GetMesh(), AbstractStimulusFactory< ELEMENT_DIM, SPACE_DIM >::GetMesh(), AbstractCardiacCellFactory< ELEMENT_DIM, SPACE_DIM >::GetMesh(), CylindricalHoneycombMeshGenerator::GetMesh(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetMeshFileBaseName(), ArchiveLocationInfo::GetMeshFilename(), HeartConfig::GetMeshPartitioning(), AbstractPurkinjeCellFactory< ELEMENT_DIM, SPACE_DIM >::GetMixedDimensionMesh(), AbstractCardiacCellWithModifiers< CARDIAC_CELL >::GetModifier(), NodeBasedCellPopulation< DIM >::GetNeighbouringNodeIndices(), AbstractOnLatticeCellPopulation< DIM >::GetNeighbouringNodeIndices(), VertexMesh< ELEMENT_DIM, SPACE_DIM >::GetNeighbouringNodeNotAlsoInElement(), VertexElementMap::GetNewIndex(), NodeMap::GetNewIndex(), NhsContractionModel::GetNextActiveTension(), VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextCableElementData(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextCableElementData(), VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementData(), VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementData(), AbstractCachedMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementData(), PottsMeshReader< SPACE_DIM >::GetNextElementData(), VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementDataWithFaces(), VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextFaceData(), AbstractCachedMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextFaceData(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextItemFromStream(), VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextLineFromStream(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextLineFromStream(), PottsMeshReader< SPACE_DIM >::GetNextLineFromStream(), VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextNode(), VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextNode(), AbstractCachedMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextNode(), PottsMeshReader< SPACE_DIM >::GetNextNode(), Warnings::GetNextWarningMessage(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNode(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNode(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNodeOrHaloNode(), HeartGeometryInformation< SPACE_DIM >::GetNodesAtSurface(), NonlinearElasticityTools< DIM >::GetNodesByComponentValue(), CommandLineArguments::GetNumberOfArgumentsForOption(), AbstractCardiacCell::GetNumSlowValues(), AbstractParameterisedSystem< VECTOR >::GetParameter(), AbstractOdeSystemInformation::GetParameterIndex(), AbstractOdeSystemInformation::GetParameterUnits(), CellBasedPdeHandler< DIM >::GetPdeSolution(), CellBasedPdeHandler< DIM >::GetPdeSolutionAtPoint(), VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetPointData(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetProcessRegion(), CellPropertyCollection::GetProperty(), AbstractCachedMeshReader< ELEMENT_DIM, SPACE_DIM >::GetRawDataFromFile(), NodeBasedCellPopulation< DIM >::GetReceivedCells(), ObjectCommunicator< CLASS >::GetRecvObject(), FileFinder::GetRelativePath(), HeartConfig::GetRelativeTolerance(), MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetRestLength(), HeartConfig::GetSheetDimensions(), HeartConfig::GetSlabDimensions(), AbstractCardiacCell::GetSlowValues(), AbstractParameterisedSystem< VECTOR >::GetStateVariable(), AbstractOdeSystemInformation::GetStateVariableIndex(), AbstractOdeSystemInformation::GetStateVariableUnits(), HeartConfig::GetStimuli(), AbstractLookupTableCollection::GetTableIndex(), CellProperties::GetTimeAtLastCompleteMaxUpstrokeVelocity(), Cell::GetTimeUntilDeath(), AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::GetTissue(), FibreReader< DIM >::GetTokensAtNextLine(), ColumnDataReader::GetUnlimitedDimensionValues(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetUnsignedAttribute(), CommandLineArguments::GetUnsignedCorrespondingToOption(), CommandLineArguments::GetValueCorrespondingToOption(), ColumnDataReader::GetValues(), OdeSolution::GetVariableAtIndex(), Hdf5DataWriter::GetVariableByName(), Hdf5DataReader::GetVariableOverNodes(), Hdf5DataReader::GetVariableOverTime(), Hdf5DataReader::GetVariableOverTimeOverMultipleNodes(), HeartConfig::GetVersionFromNamespace(), StokesFlowProblemDefinition< DIM >::GetViscosity(), MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetVoronoiEdgeLength(), VertexMesh< ELEMENT_DIM, SPACE_DIM >::GetVoronoiElementIndexCorrespondingToDelaunayNodeIndex(), NonCachedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetWeightedDirectionForElement(), WntConcentration< DIM >::GetWntGradient(), Hdf5DataWriter::Hdf5DataWriter(), HeartConfigRelatedCellFactory< SPACE_DIM >::HeartConfigRelatedCellFactory(), HeartGeometryInformation< SPACE_DIM >::HeartGeometryInformation(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::IdentifySwapType(), PlaneBoundaryCondition< DIM >::ImposeBoundaryCondition(), IncompressibleNonlinearElasticitySolver< DIM >::IncompressibleNonlinearElasticitySolver(), OrthotropicConductivityTensors< ELEMENT_DIM, SPACE_DIM >::Init(), AxisymmetricConductivityTensors< ELEMENT_DIM, SPACE_DIM >::Init(), AbstractCardiacMechanicsSolver< ELASTICITY_SOLVER, DIM >::Initialise(), CardiacElectroMechanicsProblem< DIM, ELEC_PROB_DIM >::Initialise(), AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Initialise(), CellCycleModelOdeSolver< CELL_CYCLE_MODEL, BackwardEulerIvpOdeSolver >::Initialise(), CellBasedPdeHandler< DIM >::InitialiseCellPdeElementMap(), AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::InitialiseHdf5Writer(), AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::InitialiseWriter(), FileFinder::IsEmpty(), AbstractCardiacCell::IsFastOnly(), IsolatedLabelledCellKiller< DIM >::IsolatedLabelledCellKiller(), LinearSystem::LinearSystem(), AbstractCardiacProblem< DIM, DIM, 1 >::load(), CellMLLoader::LoadCellMLFile(), MemfemMeshReader< ELEMENT_DIM, SPACE_DIM >::MemfemMeshReader(), NodePartitioner< ELEMENT_DIM, SPACE_DIM >::MetisLibraryPartitioning(), CardiacSimulationArchiver< PROBLEM_CLASS >::Migrate(), MooneyRivlinMaterialLaw< DIM >::MooneyRivlinMaterialLaw(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::MoveMergeNode(), AbstractHdf5Converter< ELEMENT_DIM, SPACE_DIM >::MoveOntoNextDataset(), NodeBasedCellPopulation< DIM >::NonBlockingSendCellsToNeighbourProcesses(), OffLatticeSimulation< ELEMENT_DIM, SPACE_DIM >::OffLatticeSimulation(), OnLatticeSimulation< DIM >::OnLatticeSimulation(), CmguiMeshWriter< ELEMENT_DIM, SPACE_DIM >::OpenElementFiles(), VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenElementsFile(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenElementsFile(), PottsMeshReader< SPACE_DIM >::OpenElementsFile(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenFacesFile(), Hdf5DataWriter::OpenFile(), GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenFiles(), VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenNodeFile(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenNodeFile(), PottsMeshReader< SPACE_DIM >::OpenNodeFile(), OutputFileHandler::OpenOutputFile(), CellBasedPdeHandler< DIM >::OpenResultsFiles(), ChastePoint< 0 >::operator[](), AbstractConductivityTensors< ELEMENT_DIM, SPACE_DIM >::operator[](), OutputFileHandler::OutputFileHandler(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::PerformT1Swap(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::PerformT2Swap(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::PerformT3Swap(), PolynomialMaterialLaw3d::PolynomialMaterialLaw3d(), PottsMesh< DIM >::PottsMesh(), ExtendedBidomainProblem< DIM >::PreSolveChecks(), BidomainProblem< DIM >::PreSolveChecks(), AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::PreSolveChecks(), StreeterFibreGenerator< SPACE_DIM >::PreWriteCalculations(), FileFinder::PrivateRemove(), HeartGeometryInformation< SPACE_DIM >::ProcessLine(), Hdf5DataWriter::PutStripedVector(), Hdf5DataWriter::PutUnlimitedVariable(), ColumnDataWriter::PutVariable(), ParallelColumnDataWriter::PutVector(), Hdf5DataWriter::PutVector(), RandomCellKiller< DIM >::RandomCellKiller(), HeartConfig::ReadFile(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders(), GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders(), AbstractPurkinjeCellFactory< ELEMENT_DIM, SPACE_DIM >::ReadJunctionsFile(), TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ReadNodesPerProcessorFile(), FibreReader< DIM >::ReadNumLinesOfDataFromFile(), ColumnDataReader::ReadValueFromFile(), XmlTools::ReadXmlFile(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::RefineElement(), AbstractTetrahedralElement< ELEMENT_DIM, SPACE_DIM >::RefreshJacobian(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::ReMesh(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::ReMesh(), Node< SPACE_DIM >::RemoveBoundaryElement(), AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::RemoveCellUsingLocationIndex(), Node< SPACE_DIM >::RemoveElement(), CellPropertyCollection::RemoveProperty(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::ReplaceNode(), PetscTools::ReplicateException(), GenericEventHandler< 11, MeshEventHandler >::ReportImpl(), AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::rGetExtracellularConductivityTensor(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::rGetNodePermutation(), LinearSystem::rGetPrecondMatrix(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::RotateX(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::RotateY(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::RotateZ(), CardiacSimulation::Run(), AbstractSteadyStateRunner::RunToSteadyState(), CardiacSimulationArchiver< PROBLEM_CLASS >::Save(), AbstractMaterialLaw< DIM >::ScaleMaterialParameters(), NodeBasedCellPopulation< DIM >::SendCellsToNeighbourProcesses(), LogFile::Set(), Cell::SetAncestor(), AbstractParameterisedSystem< VECTOR >::SetAnyVariable(), StreeterFibreGenerator< SPACE_DIM >::SetApexToBase(), ElectroMechanicsProblemDefinition< DIM >::SetApplyAnisotropicCrossFibreTension(), Cell::SetCellProliferativeType(), AxisymmetricConductivityTensors< ELEMENT_DIM, SPACE_DIM >::SetConstantConductivities(), AbstractConductivityTensors< ELEMENT_DIM, SPACE_DIM >::SetConstantConductivities(), AbstractCardiacMechanicsSolver< ELASTICITY_SOLVER, DIM >::SetConstantFibreSheetDirections(), WntConcentration< DIM >::SetConstantWntValueForTesting(), WntConcentration< DIM >::SetCryptLength(), AbstractParameterisedSystem< VECTOR >::SetDefaultInitialCondition(), AbstractParameterisedSystem< VECTOR >::SetDefaultInitialConditions(), AbstractCellCycleModel::SetDimension(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::SetDistributedVectorFactory(), AbstractCardiacMechanicsSolver< ELASTICITY_SOLVER, DIM >::SetFineCoarseMeshPair(), AbstractExtendedBidomainSolver< ELEMENT_DIM, SPACE_DIM >::SetFixedExtracellularPotentialNodes(), AbstractBidomainSolver< ELEMENT_DIM, SPACE_DIM >::SetFixedExtracellularPotentialNodes(), DistributedVectorFactory::SetFromFactory(), ExtendedBidomainProblem< DIM >::SetGgapHeterogeneities(), HeartConfig::SetKSPPreconditioner(), HeartConfig::SetKSPSolver(), AbstractSteadyStateRunner::SetMaxNumPaces(), AbstractPurkinjeCellFactory< ELEMENT_DIM, SPACE_DIM >::SetMesh(), HeartConfig::SetMeshPartitioning(), AbstractCardiacCellWithModifiers< CARDIAC_CELL >::SetModifier(), Cell::SetMutationState(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::SetNode(), AbstractOnLatticeCellPopulation< DIM >::SetNode(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::SetNodePermutation(), LinearSystem::SetNullBasis(), ElectroMechanicsProblemDefinition< DIM >::SetNumIncrementsForInitialDeformation(), CardiacElectroMechanicsProblem< DIM, ELEC_PROB_DIM >::SetOutputDeformationGradientsAndStress(), VtkMeshWriter< ELEMENT_DIM, SPACE_DIM >::SetParallelFiles(), AbstractParameterisedSystem< VECTOR >::SetParameter(), PoleZeroMaterialLaw< DIM >::SetParameters(), FileFinder::SetPath(), NodeAttributes< SPACE_DIM >::SetRadius(), MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::SetRestLength(), AbstractExtendedBidomainSolver< ELEMENT_DIM, SPACE_DIM >::SetRowForAverageOfPhiZeroed(), AbstractBidomainSolver< ELEMENT_DIM, SPACE_DIM >::SetRowForAverageOfPhiZeroed(), S1S2Stimulus::SetS2ExperimentPeriodIndex(), AbstractCardiacCell::SetSlowValues(), AbstractCardiacCell::SetState(), AbstractParameterisedSystem< VECTOR >::SetStateVariable(), AbstractParameterisedSystem< VECTOR >::SetStateVariables(), AbstractLookupTableCollection::SetTableProperties(), AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetTimes(), AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetTimeStep(), HeartConfig::SetTissueAndBathIdentifiers(), WntConcentration< DIM >::SetType(), AbstractFileComparison::Setup(), CvodeAdaptor::SetupCvode(), AbstractCvodeSystem::SetupCvode(), DistributedBoxCollection< DIM >::SetupLocalBoxesHalfOnly(), AbstractTargetAreaModifier< DIM >::SetupSolve(), AbstractCardiacMechanicsSolver< ELASTICITY_SOLVER, DIM >::SetVariableFibreSheetDirections(), AbstractContinuumMechanicsSolver< DIM >::SetWriteOutput(), SimpleDataWriter::SimpleDataWriter(), AbstractNonlinearAssemblerSolverHybrid< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Solve(), AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Solve(), RungeKuttaFehlbergIvpOdeSolver::Solve(), CvodeAdaptor::Solve(), AbstractOneStepIvpOdeSolver::Solve(), SimplePetscNonlinearSolver::Solve(), SimpleNewtonNonlinearSolver::Solve(), LinearSystem::Solve(), AbstractCellBasedSimulation< ELEMENT_DIM, SPACE_DIM >::Solve(), AbstractIvpOdeSolver::SolveAndUpdateStateVariable(), LinearParabolicPdeSystemWithCoupledOdeSystemSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SolveAndWriteResultsToFile(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::SolveBoundaryElementMapping(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::SolveElementMapping(), NodesOnlyMesh< SPACE_DIM >::SolveNodeMapping(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::SolveNodeMapping(), AbstractNonlinearElasticitySolver< DIM >::SolveNonSnes(), AbstractNonlinearElasticitySolver< DIM >::SolveSnes(), CellPropertyRegistry::SpecifyOrdering(), SphereGeometryBoundaryCondition< DIM >::SphereGeometryBoundaryCondition(), Cell::StartApoptosis(), T2SwapCellKiller< DIM >::T2SwapCellKiller(), AbstractNonlinearElasticitySolver< DIM >::TakeNewtonStep(), CommandLineArguments::TestOptionFormat(), TimeStepper::TimeStepper(), FemlabMeshReader< ELEMENT_DIM, SPACE_DIM >::TokenizeStringsToDoubles(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::TrianglesMeshReader(), ContactInhibitionCellCycleModel::UpdateCellCyclePhase(), AbstractOdeBasedCellCycleModel::UpdateCellCyclePhase(), CaBasedCellPopulation< DIM >::UpdateCellLocations(), AbstractCellBasedSimulation< ELEMENT_DIM, SPACE_DIM >::UpdateCellPopulation(), AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::UpdateNodeLocations(), OffLatticeSimulation< ELEMENT_DIM, SPACE_DIM >::UpdateNodePositions(), HeartConfig::UpdateParametersFromResumeSimulation(), AbstractNonlinearElasticitySolver< DIM >::UpdateSolutionUsingLineSearch(), AbstractCardiacCellInterface::UseCellMLDefaultStimulus(), CellBasedPdeHandler< DIM >::UseCoarsePdeMesh(), ElectroMechanicsProblemDefinition< DIM >::Validate(), SolidMechanicsProblemDefinition< DIM >::Validate(), ContinuumMechanicsProblemDefinition< DIM >::Validate(), VertexBasedCellPopulation< DIM >::Validate(), PottsBasedCellPopulation< DIM >::Validate(), NodeBasedCellPopulationWithParticles< DIM >::Validate(), NodeBasedCellPopulation< DIM >::Validate(), MeshBasedCellPopulationWithGhostNodes< DIM >::Validate(), MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::Validate(), VanLeeuwen2009WntSwatCellCycleOdeSystem::VanLeeuwen2009WntSwatCellCycleOdeSystem(), PlaneBoundaryCondition< DIM >::VerifyBoundaryCondition(), CellCycleModelProteinConcentrationsWriter< ELEMENT_DIM, SPACE_DIM >::VisitCell(), VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::VtkMeshReader(), HeartConfig::Write(), VtkNonlinearElasticitySolutionWriter< DIM >::Write(), AbstractNonlinearElasticitySolver< DIM >::WriteCurrentAverageElementStresses(), CmguiDeformedSolutionsWriter< DIM >::WriteDeformationPositions(), XdmfMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles(), XdmfMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh(), and OdeSolution::WriteToFile().

#define EXPECT0 ( cmd,
arg   ) 
Value:
{      \
    std::string _arg(arg);       \
    int retcode = cmd(_arg.c_str()); \
    if (retcode != 0) {              \
        EXCEPTION("Error executing command: " #cmd "(" + _arg + ")"); \
    } }
Note:
This macro is deprecated.

Handy for calling functions like system which return non-zero on error. Throws if an error occurs.

Note:
DO NOT use this macro within an if (PetscTools::AmMaster) block, as then you'll get deadlock if an exception is thrown when running in parallel! (Unless the block is wrapped in a try-catch and exception replication handler.) Instead, use ABORT_IF_NON0.
Parameters:
cmd command to call
arg its argument (will be converted to std::string)

Definition at line 254 of file Exception.hpp.

Referenced by PetscSetupUtils::CommonSetup(), and CellMLToSharedLibraryConverter::ConvertCellmlToSo().

#define EXPECT_NON0 ( cmd,
arg   ) 
Value:
{   \
    std::string _arg = (arg);     \
    int ret = cmd(_arg.c_str());  \
    if (ret == 0) {               \
        EXCEPTION("Command: " #cmd "(" + _arg + ") succeeded and it shouldn't have"); \
    } }
Note:
This macro is deprecated, and no longer used by core code.

Handy for calling functions like system which return non-zero on error. This time we expect failure; throws if the command succeeds.

Parameters:
cmd command to call
arg its argument (will be converted to std::string)

Definition at line 301 of file Exception.hpp.

#define IGNORE_RET ( cmd,
arg   ) 
Value:
{   \
    std::string _arg = (arg);    \
    int ret = cmd(_arg.c_str()); \
    ret = ret;                   \
    }
Note:
This macro is deprecated.

Handy for calling functions like system which return non-zero on error. This version ignores the return code, in case you don't care about errors for some reason...

Parameters:
cmd command to call
arg its argument (will be converted to std::string)

Definition at line 316 of file Exception.hpp.

Referenced by CellMLToSharedLibraryConverter::ConvertCellmlToSo().

#define NEVER_REACHED   TERMINATE("Should have been impossible to reach this line of code"); exit(EXIT_FAILURE)

Use for control paths that will never be executed, just to make sure they aren't.

The exit statement at the end of NEVER_REACHED is not really needed but prevents g++ from complaining about uninitialised variables when you have code that looks like:

   RelativeTo::Value relative_to;
   switch (rPath.relative_to())
   {
       case cp::relative_to_type::cwd:
           relative_to = RelativeTo::CWD;
           break;
       case cp::relative_to_type::chaste_test_output:
           relative_to = RelativeTo::ChasteTestOutput;
           break;
       case cp::relative_to_type::chaste_source_root:
           relative_to = RelativeTo::ChasteSourceRoot;
           break;
       case cp::relative_to_type::absolute:
           relative_to = RelativeTo::Absolute;
           break;
       default:
           NEVER_REACHED;
           break;
   }

relative_to is considered potentially uninitialised in the default branch unless the compiler finds a exit, assert or throw statement.

Definition at line 206 of file Exception.hpp.

Referenced by AbstractCellMutationState::AbstractCellMutationState(), AbstractCellProliferativeType::AbstractCellProliferativeType(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::AppendLocalDataToFiles(), ContinuumMechanicsNeumannBcsAssembler< DIM >::AssembleOnBoundaryElement(), AbstractNonlinearElasticitySolver< DIM >::AssembleOnBoundaryElement(), AbstractNonlinearElasticitySolver< DIM >::AssembleOnBoundaryElementForPressureOnDeformedBc(), IncompressibleNonlinearElasticitySolver< DIM >::AssembleOnElement(), CompressibleNonlinearElasticitySolver< DIM >::AssembleOnElement(), AbstractContinuumMechanicsAssembler< DIM, CAN_ASSEMBLE_VECTOR, CAN_ASSEMBLE_MATRIX >::AssembleOnElement(), OffLatticeSimulation< ELEMENT_DIM, SPACE_DIM >::CalculateCellDivisionVector(), DistributedBoxCollection< DIM >::CalculateCoordinateIndices(), AbstractTetrahedralElement< ELEMENT_DIM, SPACE_DIM >::CalculateWeightedDirection(), SloughingCellKiller< DIM >::CheckAndLabelCellsForApoptosisOrDeath(), AbstractCardiacCell::CheckForArchiveFix(), AbstractStimulusFunction::Clear(), CmguiDeformedSolutionsWriter< DIM >::CmguiDeformedSolutionsWriter(), CmguiMeshWriter< ELEMENT_DIM, SPACE_DIM >::CmguiMeshWriter(), VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::CommonConstructor(), QuadraticBasisFunction< ELEMENT_DIM >::ComputeBasisFunction(), QuadraticBasisFunction< ELEMENT_DIM >::ComputeBasisFunctionDerivative(), AbstractFeCableIntegralAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, CAN_ASSEMBLE_VECTOR, CAN_ASSEMBLE_MATRIX, INTERPOLATION_LEVEL >::ComputeCableMatrixTerm(), AbstractFeCableIntegralAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, CAN_ASSEMBLE_VECTOR, CAN_ASSEMBLE_MATRIX, INTERPOLATION_LEVEL >::ComputeCableVectorTerm(), DistanceMapCalculator< ELEMENT_DIM, SPACE_DIM >::ComputeDistanceMap(), CellwiseSourcePde< DIM >::ComputeLinearInUCoeffInSourceTerm(), AbstractFeVolumeIntegralAssembler< DIM, DIM, 2, false, true, CARDIAC >::ComputeMatrixTerm(), AbstractFeSurfaceIntegralAssembler< ELEMENT_DIM, SPACE_DIM, 2 >::ComputeVectorSurfaceTerm(), AbstractFeVolumeIntegralAssembler< DIM, DIM, 2, false, true, CARDIAC >::ComputeVectorTerm(), MixedDimensionMesh< ELEMENT_DIM, SPACE_DIM >::ConstructFromMeshReader(), AbstractConvergenceTester< CELL, CARDIAC_PROBLEM, DIM, PROBLEM_DIM >::Converge(), Cylindrical2dMesh::CorrectNonPeriodicMesh(), HeartConfigRelatedCellFactory< SPACE_DIM >::CreateCellWithIntracellularStimulus(), ExtendedBidomainTissue< SPACE_DIM >::CreateExtracellularConductivityTensors(), BidomainTissue< SPACE_DIM >::CreateExtracellularConductivityTensors(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::CreateFilesWithHeaders(), AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::CreateIntracellularConductivityTensor(), ExtendedBidomainTissue< SPACE_DIM >::CreateIntracellularConductivityTensorSecondCell(), MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::CreateVoronoiTessellation(), Determinant(), CardiacElectroMechanicsProblem< DIM, ELEC_PROB_DIM >::DetermineWatchedNodes(), FakeBathCell::EvaluateYDerivatives(), AbstractRushLarsenCardiacCell::EvaluateYDerivatives(), AbstractGeneralizedRushLarsenCardiacCell::EvaluateYDerivatives(), AbstractBackwardEulerCardiacCell< 0u >::EvaluateYDerivatives(), HeartConfigRelatedCellFactory< SPACE_DIM >::FillInCellularTransmuralAreas(), PottsElement< DIM >::GetAspectRatio(), ContinuumMechanicsProblemDefinition< DIM >::GetBodyForce(), AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetCellCyclePhaseCount(), VertexMesh< ELEMENT_DIM, SPACE_DIM >::GetCentroidOfElement(), HeartGeometryInformation< SPACE_DIM >::GetDistanceToEndo(), AbstractNonlinearElasticitySolver< DIM >::GetElementCentroidStrain(), GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GetElementData(), GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GetFaceData(), StreeterFibreGenerator< SPACE_DIM >::GetFibreMaxAngle(), HeartConfig::GetInterNodeSpace(), HeartConfig::GetIonicModelRegions(), GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextCableElementData(), VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextFaceData(), GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNode(), GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumCableElementAttributes(), GmshMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumCableElements(), CellBasedPdeHandler< DIM >::GetPdeSolutionAtPoint(), HeartConfig::GetStimuli(), MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetVolumeOfCell(), SimpleWntCellCycleModel::GetWntLevel(), AbstractWntOdeBasedCellCycleModel::GetWntLevel(), SimpleWntCellCycleModel::GetWntType(), SpaceConvergenceTester< CELL, CARDIAC_PROBLEM, DIM, PROBLEM_DIM >::GiveUpConvergence(), HeartFileFinder::HeartFileFinder(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::IdentifySwapType(), PlaneBoundaryCondition< DIM >::ImposeBoundaryCondition(), CardiacElectroMechanicsProblem< DIM, ELEC_PROB_DIM >::Initialise(), AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Initialise(), OperatorSplittingMonodomainSolver< ELEMENT_DIM, SPACE_DIM >::InitialiseForSolve(), AbstractCardiacTissue< SPACE_DIM >::LoadCardiacCells(), ExtendedBidomainTissue< DIM >::LoadExtendedBidomainCells(), NodePartitioner< ELEMENT_DIM, SPACE_DIM >::MetisLibraryPartitioning(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::PerformT3Swap(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::PermuteNodes(), PottsMeshGenerator< DIM >::PottsMeshGenerator(), StreeterFibreGenerator< SPACE_DIM >::PreWriteCalculations(), RandomNumberGenerator::randMod(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::ReadNodesPerProcessorFile(), MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::rGetNodePairs(), AbstractCardiacTissue< SPACE_DIM >::save(), AbstractCardiacTissue< SPACE_DIM >::SaveCardiacCells(), ExtendedBidomainTissue< DIM >::SaveExtendedBidomainCells(), Hdf5DataWriter::SetChunkSize(), SimpleWntCellCycleModel::SetG1Duration(), StochasticDurationGenerationBasedCellCycleModel::SetG1Duration(), StochasticDurationCellCycleModel::SetG1Duration(), GammaDistributedStochasticDurationCellCycleModel::SetG1Duration(), ExponentiallyDistributedStochasticDurationGenerationBasedCellCycleModel::SetG1Duration(), AbstractSimpleCellCycleModel::SetG1Duration(), FileFinder::SetPath(), LinearSystem::SetPrecondMatrixIsDifferentFromLhs(), AbstractHdf5Access::SetUnlimitedDatasetId(), DistributedBoxCollection< DIM >::SetupAllLocalBoxes(), BoxCollection< DIM >::SetupAllLocalBoxes(), CellwiseDataGradient< DIM >::SetupGradients(), DistributedBoxCollection< DIM >::SetupLocalBoxesHalfOnly(), BoxCollection< DIM >::SetupLocalBoxesHalfOnly(), AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Solve(), AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::SolveCellSystems(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::SplitEdge(), SubDeterminant(), SimpleWntCellCycleModel::UpdateCellCyclePhase(), CaBasedCellPopulation< DIM >::UpdateCellLocations(), OnLatticeSimulation< DIM >::UpdateCellPopulation(), CellBasedPdeHandler< DIM >::UseCoarsePdeMesh(), CaBasedCellPopulation< DIM >::Validate(), VectorProduct(), VtkNonlinearElasticitySolutionWriter< DIM >::Write(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesFooter(), CmguiMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteNodeFileHeader(), and CellBasedPdeHandler< DIM >::WritePdeSolution().

#define TERMINATE ( message   ) 
Value:
do {                                             \
        std::stringstream msg_stream;                \
        msg_stream << message;                       \
        Exception::Terminate(msg_stream.str(), __FILE__, __LINE__); \
    } while (false)

Terminate execution safely, even when running in parallel. Use for level 4 errors: execution cannot continue from this point and hence should be terminated (even when running with NDEBUG).

Parameters:
message explanatory message

Definition at line 168 of file Exception.hpp.

Referenced by OutputFileHandler::CopyFileTo(), AbstractBidomainSolver< ELEMENT_DIM, SPACE_DIM >::InitialiseForSolve(), OutputFileHandler::MakeFoldersAndReturnFullPath(), PCBlockDiagonal::PCBlockDiagonalCreate(), PCLDUFactorisation::PCLDUFactorisationCreate(), PCTwoLevelsBlockDiagonal::PCTwoLevelsBlockDiagonalCreate(), LinearSystem::SetPcType(), and LinearSystem::Solve().

#define UNUSED_OPT ( var   ) 

Variable Documentation

const double DOUBLE_UNSET = DBL_MAX
const int INT_UNSET = INT_MAX

Use when initialising an int variable that doesn't have a sensible default value.

Definition at line 54 of file Exception.hpp.

const unsigned UNSIGNED_UNSET = UINT_MAX

Generated by  doxygen 1.6.2