mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: TableFile: improved error message
This commit is contained in:
@ -45,6 +45,15 @@ Foam::TableFile<Type>::TableFile(const word& entryName, const dictionary& dict)
|
|||||||
fileName expandedFile(fName_);
|
fileName expandedFile(fName_);
|
||||||
IFstream is(expandedFile.expand());
|
IFstream is(expandedFile.expand());
|
||||||
|
|
||||||
|
if (!is.good())
|
||||||
|
{
|
||||||
|
FatalIOErrorIn
|
||||||
|
(
|
||||||
|
"TableFile<Type>::TableFile(const word&, const dictionary&)",
|
||||||
|
is
|
||||||
|
) << "Cannot open file." << exit(FatalIOError);
|
||||||
|
}
|
||||||
|
|
||||||
is >> this->table_;
|
is >> this->table_;
|
||||||
|
|
||||||
TableBase<Type>::check();
|
TableBase<Type>::check();
|
||||||
|
|||||||
Reference in New Issue
Block a user