in reply to Re7: Learning how to use the Error module by example
in thread Learning how to use the Error module by example
In the find() example, assuming that stored(), next() and first() can throw error exceptions, show me some simpler code using exceptions rather than multiple returns.
I've no objection to using exceptions for non-error conditions. I do it all the time :-)
However, I do have an objection to making my code more complex because of an arbitrary rule. Why should I not use return within a try block when it makes my code far easier to understand and maintain than the alternative? What is the downside?