lua-users home
lua-l archive

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

The Lua reference manual doesn't describe the error handling behavior
of file:write and some related functions.  In practice, file:write
returns a true on success and (nil, errorstring, errornumber) on error
given the return status of the underlying fwrite[1].  file:read
behaves similarly.  The iterator function returned by file:lines()
raises on error.  The reference manual does, however, say that
file:seek returns nil plus a string on error.