2002-feb24-net / 2002-feb24-net/morgan-project0
Add exception handling to ensure users can't enter non-integers
- Dominant language
- C#
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Add an exception that will stop the system from breaking when a non-integer is entered into the console.
https://github.com/2002-feb24-net/morgan-project0/blob/c13bac5a6d6e3b2856925f7d5539c685c8b9afa0/InstrumentStore.Library/Model/Customer.cs#L125
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue points to line 125 in InstrumentStore.Library/Model/Customer.cs. Start by examining that file to see how user input is currently handled. Look for a method that reads console input and parse it as an integer. Add a try-catch block or use int.TryParse to validate the input and provide a helpful error message. Test by running the console application and entering non-integer values to ensure the system no longer breaks.
Written by the indexing model from the issue text.
Assessment
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 65/100