#include <lua/errno.lh>
- text, errno = handle:lastError()
- handle:clearError()
- handle:setError(errno)
When any of the other functions working on a file handle indicates an error condition, the error is stored inside the handle and can be retrieved by calling rawio:lastError().
When the error has been handled by the application, it can be cleared by calling rawio:clearError().
To manually simulate an error condition, pass a numeric errno code to rawio:setError().
If an error has been stored, returns two values: a string describing the error (The result of the C library call strerror() on the errno code) and the errno number from the standard C library.
If no error has been stored, returns nil.