[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: file:write() fails silently for read-only files
- From: steve donovan <steve.j.donovan@...>
- Date: Tue, 6 Sep 2011 09:26:05 +0200
On Tue, Sep 6, 2011 at 9:21 AM, startx <startx@plentyfact.org> wrote:
> success will be NIL if the file cannot be written to.
> one one hand i see your point that it could throw an error instead, but
> then again ...
You could wrap up the Lua file object so that the write/read methods
throw errors, so it's not difficult to choose the error handling mode
you need.
steve d.