lua-users home
lua-l archive

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

Le 02/07/2014 14:18, Victor Bombi a écrit :

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

works because in case of error returns nil, err so you would like to change also to return a predefined table?!

Yes, you're right, the was a wrong example, I have other function which sometimes returns just false instead of the error message. e.g when there are no error message.