ENH: TableFile: improved error message

This commit is contained in:
mattijs
2012-04-17 17:59:29 +01:00
parent b4fe2268a3
commit 336f84fd0e

View File

@ -45,6 +45,15 @@ Foam::TableFile<Type>::TableFile(const word& entryName, const dictionary& dict)
fileName expandedFile(fName_);
IFstream is(expandedFile.expand());
if (!is.good())
{
FatalIOErrorIn
(
"TableFile<Type>::TableFile(const word&, const dictionary&)",
is
) << "Cannot open file." << exit(FatalIOError);
}
is >> this->table_;
TableBase<Type>::check();