Comprehensive Windows framework to develop in Lua
modules > console > stderr

console.stderr read/write property

The console.stderr property gets the current standard console error output file. It's a File value

console.stderr redirection

Setting the console.stderr property to another File redirects console error output to it : any further call to console.stderr:write() will write output to that File. Closing the console.stderr property closes the current File and reuse the default console error output File.


local console = require "console"

console.stderror:write("Error : internet connection lost")