Global Lua Modules/User error

Sometimes you want your module to break, in an obvious and informative manner. The built-in  function fills this role for developers, but is woefully unclear from the perspective of an ordinary user. This module provides a less intimidating error function, designed to warn even people who know nothing about Lua.

Syntax
userError(message[, category1[, category2[, ...[, categoryN]]]])

Parameters

 * An error message to be displayed.
 * An error message to be displayed.


 * Tracking categories to be added when  is displayed.
 * Tracking categories to be added when  is displayed.

Throwing an error
The following code adds  to a page.

Adding categories
The following code adds  to a page, and places it in   and.