No, it should not be an error. If you’re making a calculator and your user enters 1/0, your program should not have the propensity to crash; the result should simply be NaN and you should choose how you display that result to your user.
- 0 Posts
- 2 Comments
Joined 1 year ago
Cake day: October 10th, 2025
You are not logged in. If you use a Fediverse account that is able to follow users, you can follow this user.


I’m just saying a try-catch feels like a little much for handling mathematically valid user input.