3 ms·
I am suggesting to use it to throw exceptions. This narrow purpose is subtly hinted at by its name.
by smt88 5y ago
I am suggesting to use it to throw exceptions. This narrow purpose is subtly hinted at by its name.
- the_other 5y agoI don’t see how it’s hinted in the name. “Throwing an exception” is a phrase from within computing that exists because the feature exists in some languages, not because it came into programming from English. There’s also nothing about “exception” that means “error”. If anything, modelling exceptions as errors is the anti-pattern. If you modelled all exceptions as descriptors, you could save Errors for when something actually goes wrong. Honestly though, I’m employing Socratic argument. I am only defending this position to learn about the opposite.