[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Try-catch and try-finally
- From: Peter Melnichenko <mpeterval@...>
- Date: Tue, 31 May 2016 15:34:53 +0300
On Tue, May 31, 2016 at 3:11 PM, steve donovan
<steve.j.donovan@gmail.com> wrote:
> I tend to side with Jonne here - exceptions are overused. It's easy to
> check if a file exists, why throw an exception to be handled dozens of
> stack frames down? (--> Java <---)
Because I may not want to write
local result, err = func()
if not result then return nil, err end
dozens of times.
(Sorry, as expected, this thread becomes the usual "errors vs,
exception" debate)
-- Peter