Skip to content
Snippets Groups Projects
Commit 336f84fd authored by mattijs's avatar mattijs
Browse files

ENH: TableFile: improved error message

parent b4fe2268
Branches
Tags
No related merge requests found
......@@ -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();
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment