lua-users home
lua-l archive

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


Perhaps a little more documentation about this might be sufficient, but this
then raises the question of why one ever catches hard errors if they are
basically to be treated as "something very bad happened". Furthermore,
Diego's scheme in Lua socket uses exceptions for more than just hard errors.

Mark

on 8/11/05 9:44 AM, Luiz Henrique de Figueiredo at lhf@tecgraf.puc-rio.br
wrote:

>> I think part of the issue is that Lua has a couple of methods for reporting
>> errors:
> 
> Sure, but they serve different purposes. Throwing an error is meant for
> hard errors, things that should not occur and the programmer doesn't
> what to handle. Returning nil+message is meant for soft errors, things
> that may occur and that the programmer wants to handle. Or am I missing
> something? --lhf