4 ms·
> So exceptions should be exceptional, unusual or rare, much like a asteroid strike!! That's a super huge misread of the text recommendation. I watched a live
by coding123 7y ago
> So exceptions should be exceptional, unusual or rare, much like a asteroid strike!!
That's a super huge misread of the text recommendation.
I watched a live presentation directly from Jeffrey Richter at the bay area .net user group, oh god about 15 years ago when he described how he came up with this text. In fact it was a call to use exceptions a lot more than we used to, and to avoid error codes. So no, exceptions are not supposed to be rare like that.
His main point was to throw if the method name was not achievable, except in specific situations where that breaks user expectations too much, like getting null from missing map entries.