2002-feb24-net / 2002-feb24-net/morgan-project0

Add exception handling to ensure users can't enter non-integers

Open Beginner friendly
#1 0 comments 0 reactions 0 assignees View on GitHub
bug
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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.