1
0
Bifurcation 0

Added a quest list to error messages.

Cette révision appartient à :
Nathanial.C.Jones 2011-01-22 23:51:21 +00:00
Parent 3ca91527ec
révision 204d3d1e41
1 fichiers modifiés avec 20 ajouts et 0 suppressions

Voir le fichier

@ -29,6 +29,24 @@ end
-- ganked verbatim from Swatter
function QuestHelper_ErrorCatcher.GetQuests()
local return_string = ""
for q = 1, GetNumQuestLogEntries() do
local title, _, _, _, header, _, _, _, id = GetQuestLogTitle(q)
if header then
if id then
return_string = return_string .. string.format("%s (%d)\n", title, id)
else
return_string = return_string .. string.format("[%s]\n", title)
end
else
return_string = return_string .. string.format("\t%s (%d)\n", title, id)
end
end
return return_string
end
function QuestHelper_ErrorCatcher.GetAddOns()
local addlist = ""
for i = 1, GetNumAddOns() do
@ -155,6 +173,7 @@ function QuestHelper_ErrorCatcher_ExplicitError(loud, o_msg, o_frame, o_stack, .
terror.addons = QuestHelper_ErrorCatcher.GetAddOns()
terror.stack = o_stack or terror.stack
terror.silent = not loud
terror.quests = QuestHelper_ErrorCatcher.GetQuests()
QuestHelper_ErrorCatcher_RegisterError("crash", terror)
@ -190,6 +209,7 @@ function QuestHelper_ErrorCatcher_GenerateReport()
terror.stack = ""
terror.silent = "(Full report)"
terror.generated = true
terror.quests = QuestHelper_ErrorCatcher.GetQuests()
first_error = terror
end