Hoo man has uploaded a new change for review. https://gerrit.wikimedia.org/r/163066
Change subject: Properly specify level for error calls ...................................................................... Properly specify level for error calls So that error messages contain the actual error source and not Capiunto's code. See also: http://www.lua.org/manual/5.1/manual.html#pdf-error Bug: 69540 Change-Id: I2d315ea2d29dc70139add59862ee4a0f9f021fc9 --- M includes/lua/Infobox.lua 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Capiunto refs/changes/66/163066/1 diff --git a/includes/lua/Infobox.lua b/includes/lua/Infobox.lua index afb4454..60997d6 100644 --- a/includes/lua/Infobox.lua +++ b/includes/lua/Infobox.lua @@ -25,13 +25,13 @@ local function verifyStringNumNil( val, name ) if val ~= nil and type( val ) ~= 'string' and type( val ) ~= 'number' then - error( name .. ' must be either of type string, number or nil' ) + error( name .. ' must be either of type string, number or nil', 3 ) end end local function verifyStringNum( val, name ) if type( val ) ~= 'string' and type( val ) ~= 'number' then - error( name .. ' must be either of type string or number' ) + error( name .. ' must be either of type string or number', 3 ) end end @@ -146,7 +146,7 @@ if type( text ) ~= 'string' and type( text ) ~= 'number' then -- Tables have already been converted above, so we don't have to worry about them here. - error( 'text must be either of type string, number or table' ) + error( 'text must be either of type string, number or table', 2 ) end t.args.rows = t.args.rows or {} @@ -184,7 +184,7 @@ function infobox.create( options ) local function verifyStringNumNil( val, name ) if val ~= nil and type( val ) ~= 'string' and type( val ) ~= 'number' then - error( 'Option ' .. name .. ' must be either of type string, number or nil' ) + error( 'Option ' .. name .. ' must be either of type string, number or nil', 3 ) end return val -- To view, visit https://gerrit.wikimedia.org/r/163066 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2d315ea2d29dc70139add59862ee4a0f9f021fc9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Capiunto Gerrit-Branch: master Gerrit-Owner: Hoo man <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
