Some operations require that open or popen succeeds. An assert wrapper is added when necessary.
Without that assert, the error manager reports an attempt to operate on a nil unexpected value.
With that assert, the error manager reports a file system problem.
Summer cleaning:
local copies of io... functions
extra local declaration removed
set file* variables to nil when the file is closed and the variable is used afterwards, ⇒ LLS annotations
stick to Lua 5.3 ⇒ no more "*a", "*all"
avoid leaving files open
consistency: prefer ...:close() instead of close(...)
Some operations require that
open
orpopen
succeeds. Anassert
wrapper is added when necessary. Without thatassert
, the error manager reports an attempt to operate on anil
unexpected value. With thatassert
, the error manager reports a file system problem.Summer cleaning:
io...
functionslocal
declaration removedfile*
variables tonil
when the file is closed and the variable is used afterwards, ⇒ LLS annotations"*a"
,"*all"
...:close()
instead ofclose(...)