Skip to content
Snippets Groups Projects
Commit 13f04876 authored by Mark OLESEN's avatar Mark OLESEN
Browse files

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
1 merge request!146improve consistency in parsing primitives from strings
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment