39 char *endptr =
nullptr;
41 const intmax_t parsed = ::strtoimax(buf, &endptr, 10);
43 const int val = int(parsed);
47 (parsed < INT_MIN || parsed > INT_MAX)
48 ? parsing::errorType::RANGE
52 if (err != parsing::errorType::NONE)
65 char *endptr =
nullptr;
67 const intmax_t parsed = ::strtoimax(buf, &endptr, 10);
73 (parsed < INT_MIN || parsed > INT_MAX)
errorManipArg< error, int > exit(error &err, const int errNo=1)
int readInt(Istream &is)
Read int from stream.
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
errorType checkConversion(const char *buf, char *endptr)
Sanity check after strtof, strtod, etc.
errorType
Enumeration for possible parsing error.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
const Foam::Enum< errorType > errorNames
Strings corresponding to the errorType.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...