From 6c0f98b736dd001f11e6525203db0aea8adba4b4 Mon Sep 17 00:00:00 2001 From: tercio Date: Tue, 30 Dec 2014 01:17:59 -0200 Subject: [PATCH] - Added /details exitlog: shows occurrences of errors during the last logoff. --- boot.lua | 2 +- functions/profiles.lua | 2 ++ functions/slash.lua | 18 ++++++++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/boot.lua b/boot.lua index a8ccdd3c..703479f1 100644 --- a/boot.lua +++ b/boot.lua @@ -4,7 +4,7 @@ _ = nil _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0") _detalhes.build_counter = 319 --it's 319 for release - _detalhes.userversion = "v3.6.14" + _detalhes.userversion = "v3.6.14a" _detalhes.realversion = 55 --core version _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" diff --git a/functions/profiles.lua b/functions/profiles.lua index 6b85e02a..370d6754 100644 --- a/functions/profiles.lua +++ b/functions/profiles.lua @@ -394,8 +394,10 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy) instance.posicao = table_deepcopy (skin.__pos) else if (not instance.posicao) then + print ("|cFFFF2222Details!: Position for a window wasn't found! Moving it to the center of the screen.|r\nType '/details exitlog' to check for errors.") instance.posicao = {normal = {x = 1, y = 1, w = 300, h = 200}, solo = {}} elseif (not instance.posicao.normal) then + print ("|cFFFF2222Details!: Normal position for a window wasn't found! Moving it to the center of the screen.|r\nType '/details exitlog' to check for errors.") instance.posicao.normal = {x = 1, y = 1, w = 300, h = 200} end end diff --git a/functions/slash.lua b/functions/slash.lua index 697ae664..627a71e2 100644 --- a/functions/slash.lua +++ b/functions/slash.lua @@ -82,6 +82,24 @@ function SlashCmdList.DETAILS (msg, editbox) -------- debug --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + elseif (msg == "exitlog") then + + local exitlog = _detalhes_global.exit_log + local exiterrors = _detalhes_global.exit_errors + + print ("EXIT LOG:") + for index, text in ipairs (exitlog) do + print (text) + end + print ("ERRORS:") + if (exiterrors) then + for index, text in ipairs (exiterrors) do + print (text) + end + else + print ("|cFF00FF00No error occured!|r") + end + elseif (msg == "realmsync") then _detalhes.realm_sync = not _detalhes.realm_sync