lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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