jonasngs/ped

Large calorie input causes error which did not correctly address the invalid input

Opened this issue · 0 comments

bug9.PNG

Command to replicate bug:
addR n/salad i/lettuce, tomato, olive oil c/40000000000 img/images/healthy1.jpg instr/Cook pasta. Serve immediately. t/fast t/easy

Command with bug:

  • add recipe command
  • edit recipe command

Even though the provided calorie input argument (40000000000) is a positive integer number, which was the requirement as specified by the application, it gave an error message which did not accurately address the issue. The input argument did satisfy the constraints, but the command input was rejected still. Perhaps careful handling of the calorie input argument should be enforced.