Commit 328716b
committed
Improve error handling in enums-exercise.py
- Add sys import for proper error handling
- Change error output to stderr instead of stdout
- Replace return statement with sys.exit(1) for proper program termination
- Ensures invalid input causes program to exit with error code 11 parent 120cd4f commit 328716b
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
47 | | - | |
48 | | - | |
| 48 | + | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
0 commit comments