PetKosTuni / Epidemic-model-of-COVID

Project O: Epidemic model of COVID for the course COMP.SE.610/620 Spring 2024 Software Engineering Project 1 and 2
3 stars 0 forks source link

Add more descriptive error messages #117

Closed JoonasPel closed 5 months ago

JoonasPel commented 6 months ago

Added better error message for two situations.

  1. Invalid "level" arg, e.g. "--level states". ("state" is correct). Old error: UnboundLocalError: cannot access local variable 'region_list' where it is not associated with a value New error: ValueError: level 'states' is invalid

  2. Invalid state given, e.g. " --state Alabamaa" instead of "Alabama" Old error: IndexError: index 0 is out of bounds for axis 0 with size 0 New error: GIVEN STATE 'Alabamaa' NOT FOUND

sampozki commented 5 months ago

Looks good to me!

micheyll commented 5 months ago

GJ, merged, looks good.