Module:Exception

From Wikiversity
Jump to navigation Jump to search

Exception[edit source]

This module contains methods helping to work with errors in Lua scripts and thus is not intended to be used in wiki pages.

throw[edit source]

Raise an exception including the current stack trace.

Parameters[edit source]

  • [String] errorMessage: helpful message that will be the head of the error raised

function throw(errorMessage)
	error(debug.traceback(errorMessage, 2));
end