From a1000b51b115a7d206a74e19caf2ba4f28c97234 Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 14 Apr 2009 12:57:27 +0100 Subject: [PATCH] improved error handling --- .../SinglePhaseMixture/SinglePhaseMixture.C | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SinglePhaseMixture/SinglePhaseMixture.C b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SinglePhaseMixture/SinglePhaseMixture.C index bed2f1f94b..a2ae2053d1 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SinglePhaseMixture/SinglePhaseMixture.C +++ b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SinglePhaseMixture/SinglePhaseMixture.C @@ -31,7 +31,14 @@ License template void Foam::SinglePhaseMixture::constructIds() { - if (this->phaseProps().size() != 1) + if (this->phaseProps().size() == 0) + { + FatalErrorIn + ( + "void Foam::SinglePhaseMixture::constructIds()" + ) << "Phase list is empty" << nl << exit(FatalError); + } + else if (this->phaseProps().size() > 1) { FatalErrorIn (