ENH: improve input stringency for argList options
Previously: - bad command-line input such as -label 1234xyz would parse as a label (with value 1234) and the trailing junk would be silently ignored. This may or may not be appropriate. If the trailing junk looked like this '100E' or '1000E-' (ie, forgot to type the exponent), the incorrectly parsed values can be quite bad: label = 32684 scalar = 6.93556e-310 Now: - use the updated readLabel/readScalar routines that trigger a FatalIOError on bad input: --> FOAM FATAL IO ERROR: Trailing content found parsing '1234xyz' --> FOAM FATAL IO ERROR: Trailing content found parsing '100E' This traps erroneous command-line input immediately.
parent
1c649817
Branches
Tags
Showing
- applications/test/argList/Make/files 3 additions, 0 deletionsapplications/test/argList/Make/files
- applications/test/argList/Make/options 2 additions, 0 deletionsapplications/test/argList/Make/options
- applications/test/argList/Test-argList.C 80 additions, 0 deletionsapplications/test/argList/Test-argList.C
- applications/utilities/mesh/conversion/plot3dToFoam/plot3dToFoam.C 2 additions, 2 deletions...ons/utilities/mesh/conversion/plot3dToFoam/plot3dToFoam.C
- src/OpenFOAM/global/argList/argList.H 6 additions, 6 deletionssrc/OpenFOAM/global/argList/argList.H
- src/OpenFOAM/global/argList/argListI.H 43 additions, 12 deletionssrc/OpenFOAM/global/argList/argListI.H