Skip to content
EntityQ58041032· pop 40

Module:CallAssert

Sign in to save

Wikimedia module

~2 min read

Article

Module documentation

This metamodule provides function callAssert, which simplifies error checking by throwing an error if a given function returns nil or false. This is similar to the built-in function assert, but unlike it, callAssert itself calls the function, whose return value is to be checked. This allows it to include the function name and argument values in the error message.

Categories