net.error readonly property
The net.error property gets the last network error message or nil
Example
local net = require "net"
print("net.error = "..(net.error or "none"))
-- error : calling net.select() with an empty array
net.select({})
print("net.error : "..net.error)