- replace the assertion error with a much nicer error that can give me real info.

This commit is contained in:
ckknight
2008-03-25 20:06:46 +00:00
parent 74c6901b4c
commit fd855d18c6

View File

@ -293,7 +293,10 @@ function DogTag:AddFontString(fs, frame, code, ...)
if codeToEventList_nsList_kwargTypes_code == nil then
local _ = codeToFunction[nsList][kwargTypes][code]
codeToEventList_nsList_kwargTypes_code = codeToEventList[nsList][kwargTypes][code]
assert(codeToEventList_nsList_kwargTypes_code ~= nil)
if codeToEventList_nsList_kwargTypes_code == nil then
local _, minor = LibStub(MAJOR_VERSION)
error(("%s.%d: Error with code %q%s. Event list not created. Please inform ckknight."):format(MAJOR_VERSION, minor, code, nsList == "Base" and "" or " (" .. nsList .. ")"))
end
end
if codeToEventList_nsList_kwargTypes_code then
for event, arg in pairs(codeToEventList_nsList_kwargTypes_code) do