lua-users home
lua-l archive

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


On Tue, Oct 16, 2012 at 5:00 PM, Luiz Henrique de Figueiredo
<lhf@tecgraf.puc-rio.br> wrote:
> The standard io library does not do this. It sets the file handle to
> NULL so that it can issue a "closed file" error message when the user
> tries to use an invalid file handle.

Yes, I prefer this solution also, since an error message like "attempt
to index field '?' (a user data value)" could be very confusing to a user.

Thanks for the answers everyone.

Josh