3 ms·
I think it’s cute you think most developers let exceptions rise. Most developers I notice just catch the error right away and make the function return somethin
by thrashh 3y ago
I think it’s cute you think most developers let exceptions rise.
Most developers I notice just catch the error right away and make the function return something non-sensible like a 0 for a string value function.
Slightly better developers just let the exceptions bubble.
The rare breed looks at what exceptions are being thrown, decides which ones to handle at which stack level, and repackages them as needed when the error cannot be handled that deep in that stack due to a lack of context. Then they write framework-level exception handlers for errors that rise to the top because they cannot be corrected at a higher stack level to give users specific error messages with user-correctable actions without revealing anything sensitive. “Your image is too small, wanker.”
- vel0city 3y agoGotta love these though: catch {};
- rjbwork 3y agoPokemon!
- hu3 3y agoAhhh the Visual Basic days of: On Error Resume Next In the first line of every function. It's tells the Interpreter: "Shhhh, it's fine. Just ignore errors. Division by zero? No worries. It's Fiiiiine. Try to access inexistent index of an array? Who cares, it's Friday!"
- janderland 3y agoJust a reminder that you don’t need to be patronizing to get your point across. Calling someone “cute” is a bit much.