mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
rename Foam::dotFoam() -> Foam::findEtcFile() with an optional 'mandatory' argument
- if mandatory is true, findEtcFile() will abort with a message (via cerr). This allows a non-existent file to be caught at the lowest level and avoid error handling in IFstream, which might not be initialized at that stage.
This commit is contained in:
@ -78,7 +78,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
Info<< nl << "Reading Burcat data dictionary" << endl;
|
||||
|
||||
fileName BurcatCpDataFileName(dotFoam("thermoData/BurcatCpData"));
|
||||
fileName BurcatCpDataFileName(findEtcFile("thermoData/BurcatCpData"));
|
||||
|
||||
// Construct control dictionary
|
||||
IFstream BurcatCpDataFile(BurcatCpDataFileName);
|
||||
|
||||
@ -79,7 +79,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
Info<< nl << "Reading Burcat data dictionary" << endl;
|
||||
|
||||
fileName BurcatCpDataFileName(dotFoam("thermoData/BurcatCpData"));
|
||||
fileName BurcatCpDataFileName(findEtcFile("thermoData/BurcatCpData"));
|
||||
|
||||
// Construct control dictionary
|
||||
IFstream BurcatCpDataFile(BurcatCpDataFileName);
|
||||
|
||||
@ -77,7 +77,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
Info<< nl << "Reading Burcat data dictionary" << endl;
|
||||
|
||||
fileName BurcatCpDataFileName(dotFoam("thermoData/BurcatCpData"));
|
||||
fileName BurcatCpDataFileName(findEtcFile("thermoData/BurcatCpData"));
|
||||
|
||||
// Construct control dictionary
|
||||
IFstream BurcatCpDataFile(BurcatCpDataFileName);
|
||||
|
||||
Reference in New Issue
Block a user