Re:You Can Throw() Anything in JavaScript – and Other Async/...
by the_other on Saturday April 09, 2022 @11:15AM
(#30968747)
I 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.
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.