Comprehensive Windows framework to develop in Lua
modules > ui > error

ui.error (msg , [title] )

Displays an error message dialog box with a red-cross icon, and waits for the user to click the OK button.



A string that indicates the error message to display to the user.


An optional string that indicates the title of the message dialog box (defaulting to "Error")

Return value

This function returns the string "ok" once the user has pressed the OK button or after having closed the dialog.


local ui = require "ui"

-- show an error message in a dialog box
ui.error("An error have been encountered, application will exit NOW", "Fatal error")