Module:CryptogullJr: Difference between revisions

m
no edit summary
(error handling)
mNo edit summary
Line 25: Line 25:
local frame = mw.getCurrentFrame()
local frame = mw.getCurrentFrame()
local gzdecode = zlib.gzdecode(zlib.base64_decode(code))
local gzdecode = zlib.gzdecode(zlib.base64_decode(code))
if gzdecode == false then -- error handling
if gzdecode == false or gzdecode == nil then -- error handling
error("This code isn't in base64. Please double check your input!")
error("This code isn't in base64. Please double check your input!")
end
end