mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
initial error checking
This commit is contained in:
@ -53,9 +53,24 @@ dimensionedScalar dimensionedConstant
|
||||
{
|
||||
dictionary& dict = dimensionedConstants();
|
||||
|
||||
const word unitSet(dict.lookup("unitSet"));
|
||||
// Check that the entries exist.
|
||||
// Note: should make FatalError robust instead!
|
||||
|
||||
dictionary& unitDict(dict.subDict(unitSet + "Coeffs"));
|
||||
if (!dict.found("unitSet"))
|
||||
{
|
||||
std::cerr<< "Cannot find unitSet in dictionary " << dict.name()
|
||||
<< std::endl;
|
||||
}
|
||||
|
||||
const word unitSetCoeffs(word(dict.lookup("unitSet")) + "Coeffs");
|
||||
|
||||
if (!dict.found(unitSetCoeffs))
|
||||
{
|
||||
std::cerr<< "Cannot find " << unitSetCoeffs << " in dictionary "
|
||||
<< dict.name() << std::endl;
|
||||
}
|
||||
|
||||
dictionary& unitDict = dict.subDict(unitSetCoeffs);
|
||||
|
||||
dictionary& groupDict = unitDict.subDict(group);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user