lua-users home
lua-l archive

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


On Tue, Apr 12, 2011 at 5:14 PM, Javier Guerra Giraldez
<javier@guerrag.com> wrote:
>> - it errors instead of returning nil,emsg (its easier to wrap in
>> assert when you want to error than wrap in pcall when you don't)
>
> i usually agree with you... don't remember why i chose to do that way.
> i'll check tonight and have some answer

i found why:  when in loop, the callback can break out by raising an
error, which isn't propagated (because of the Lua-C-Lua callchain),
but i couldn't decide if re-raise it or signal as nil,msg; in the end
i chose to raise all library-originated errors but return
callback-originated ones.

i've just changed everything to nil,msg style :-)

-- 
Javier