News for hackers. Stuff that matters.
Re:Code Design Decision – Always throw custom exceptions by zaphar on Monday December 19, 2022 @03:02PM (#34056874)
If it's an unchecked exception experience says I have a 60-70 percent chance of not knowing it's there without a careful reading of the code. Which means I can't know myself if it's possible to handle it or not. I can always rethrow an exception if I know it exists. Languages that give me a way to ensure I know about it means I avoid unnecessary pain later in production with someone breathing down my neck to please fix it now. I'll take that any day over a little boilerplate.

There are no comments on this comment yet.