Opened 10 years ago

Closed 10 years ago

#3204 closed enhancement (fixed)

Override error checking

Reported by: crupp@… Owned by: Adrian Pop
Priority: high Milestone: 1.9.2
Component: Run-time Version: trunk
Keywords: Cc:

Description

Currently, there is no error checking when using -override on the command line. If an override is misspelled by accident, then you will mistakenly think a parameter was changed even though it wasn't.

It would be great if error checking was added to make sure that the override variable exists and if not then issue an error stating that the override is invalid because the variable doesn't exist.

Change History (3)

comment:1 by Adrian Pop, 10 years ago

Owner: changed from somebody to Adrian Pop
Status: newaccepted

Should be easy to do in source:trunk/SimulationRuntime/c/simulation/simulation_input_xml.cpp in function doOverride. Just add a new field in the map override map and mark it when the overrides are used and whatever left unused report as an error or warning.

comment:2 by Adrian Pop, 10 years ago

Component: UnknownRun-time

comment:3 by Adrian Pop, 10 years ago

Milestone: Future1.9.2
Resolution: fixed
Status: acceptedclosed

Fixed in r25005:

$ ./BouncingBall.exe -override not_existent1=10,not_existent2=15,g=100
stdout            | warning | simulation_input_xml.cpp: override variable name not found in model: not_existent1
stdout            | warning | simulation_input_xml.cpp: override variable name not found in model: not_existent2
Note: See TracTickets for help on using tickets.