ui.error(msg, [title])function

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

Parameters

msg

A string, or any value converted to a string, that indicates the error message to display to the user.

[title]

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.

Example

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