sys.error readonly property



The sys.error property returns a string representing the last Windows error message or nil if no error occured.

Example

-- copy a file that does not exist local file = sys.File("xjkyezzrkjzkf") if file:copy("newfile.bin") == false then print("error : "..sys.error) end