I still fail to see the bug. What is the problem if the error reported is a real error in 'fclose' instead of the previous error
Obviously I disagree with Roberto :-)
The function must return the first error condition, any other solution is unreliable so useless.
You must also read _and_ understand the documentation of the functions involved, especially under which circumstances the cause which failure.
Then you can decide if the situation can really arise when _reading_ a file or not.
I am a newbie in the "Lua ecosystem".
Every software has bugs, big and small.
Lua is an excellent tool; we can only improve it.
M
On Thu, 14 May 2020, 20:21 Coda Highland, <[email protected]> wrote:
An error in closing the file after an error has already occurred on the file is highly likely to be spurious -- after a file has had a critical error that would warrant closing the file handle unconditionally, you really can't trust its state, so any error that comes up while trying to clean it up probably isn't helpful.
/s/ Adam
_______________________________________________
lua-l mailing list -- [email protected]
To unsubscribe send an email to [email protected]
_______________________________________________ lua-l mailing list -- [email protected] To unsubscribe send an email to [email protected]
_______________________________________________
lua-l mailing list -- [email protected]
To unsubscribe send an email to [email protected]