Opened 10 years ago

Closed 10 years ago

#3204 closed enhancement (fixed)

Override error checking

Reported by: crupp@… Owned by: adrpo
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 Changed 10 years ago by adrpo

  • Owner changed from somebody to adrpo
  • Status changed from new to accepted

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 Changed 10 years ago by adrpo

  • Component changed from Unknown to Run-time

comment:3 Changed 10 years ago by adrpo

  • Milestone changed from Future to 1.9.2
  • Resolution set to fixed
  • Status changed from accepted to closed

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.