HomePhabricator

Improve error messages in mw.html

This commit no longer exists in the repository. It may have been part of a branch which was deleted.This commit has been deleted in the repository: it is no longer reachable from any branch, tag, or ref.

Description

Improve error messages in mw.html

This sets the location of errors raised by mw.html.lua to the
calling module, rather than inside mw.html.lua itself. Some errors also
now display the type and position in the argument list of the argument
that caused the error, via the new verifyString function. This should
make it easier for module writers to locate errors in their code.

Also, the format of the error changes has been switched from
"Error message: Explanation" to "error message (explanation)", in
line with other Scribunto library error messages. Type errors
generated with verifyString have been changed to "bad argument #n
in 'html:foo' (expected bar, got baz)", in line with the checktype
function in the libraryUtil library.

Change-Id: If9cf9a52bd4b1bb42cc7f9f1f1096828710cbc52

Details

Provenance
MrStradivariusAuthored on Jul 10 2014, 11:02 AM
ChangeId
If9cf9a52bd4b1bb42cc7f9f1f1096828710cbc52

Commit No Longer Exists

This commit no longer exists in the repository.