mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: remove FULLDEBUG output on readLabel, readScalar
- used in various places to test if the input can be parsed as a label/scalar, so warnings tend to flood the output. - be more explicit when encountering range errors
This commit is contained in:
@ -30,7 +30,8 @@ License
|
||||
const Foam::Enum<Foam::parsing::errorType>
|
||||
Foam::parsing::errorNames
|
||||
{
|
||||
{ errorType::GENERAL, "General error parsing" },
|
||||
{ errorType::GENERAL, "General error parsing" },
|
||||
{ errorType::RANGE, "Range error while parsing" },
|
||||
{ errorType::TRAILING, "Trailing content found parsing" },
|
||||
};
|
||||
|
||||
|
||||
@ -56,7 +56,8 @@ namespace parsing
|
||||
{
|
||||
NONE = 0, //!< No error encountered
|
||||
GENERAL = 1, //!< General parsing error
|
||||
TRAILING = 2, //!< Trailing content detected
|
||||
RANGE = 2, //!< Range error
|
||||
TRAILING = 3, //!< Trailing content detected
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -32,7 +32,7 @@ inline Foam::parsing::errorType Foam::parsing::checkConversion
|
||||
if (errno || endptr == buf)
|
||||
{
|
||||
// Some type of error OR no conversion
|
||||
return errorType::GENERAL;
|
||||
return (errno == ERANGE ? errorType::RANGE : errorType::GENERAL);
|
||||
}
|
||||
|
||||
// Trailing spaces are permitted
|
||||
|
||||
Reference in New Issue
Block a user