improved error handling

This commit is contained in:
andy
2009-04-14 12:57:27 +01:00
parent 26aef1ae5a
commit a1000b51b1

View File

@ -31,7 +31,14 @@ License
template<class CloudType>
void Foam::SinglePhaseMixture<CloudType>::constructIds()
{
if (this->phaseProps().size() != 1)
if (this->phaseProps().size() == 0)
{
FatalErrorIn
(
"void Foam::SinglePhaseMixture<CloudType>::constructIds()"
) << "Phase list is empty" << nl << exit(FatalError);
}
else if (this->phaseProps().size() > 1)
{
FatalErrorIn
(