lua-users home
lua-l archive

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




local f = assert(io.open("my_secret_file", { code = 123, message = "database could not be opened" }))


assert(io.open("my_secret_file"))
works because in case of error io.open returns nil, err so you would like to change io.open also to return a predefined table?!