From 0f82f3182daff46d887319729cf4cbffc3b9e191 Mon Sep 17 00:00:00 2001 From: d87 Date: Sun, 20 Dec 2020 18:04:55 +0700 Subject: [PATCH] Error handling mysterious PlayerFrame SetUserPlaced --- Aptechka.lua | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Aptechka.lua b/Aptechka.lua index c16a678..86bdc97 100644 --- a/Aptechka.lua +++ b/Aptechka.lua @@ -290,7 +290,7 @@ function Aptechka.PLAYER_LOGIN(self,event,arg1) Aptechka.Roster = Roster if AptechkaDB.global.disableBlizzardPlayer then - helpers.DisableBlizzPlayerFrame() + Aptechka:SafeCallDirect(helpers.DisableBlizzPlayerFrame) end if AptechkaDB.global.disableBlizzardParty then helpers.DisableBlizzParty() @@ -2291,6 +2291,18 @@ do end end end + local errorhandler2 = function(err) + print("|cffff7777Aptechka Error:|r") + print(err) + end + function Aptechka:SafeCallDirect(func, ...) + if func then + local ok, ret = xpcall(func, errorhandler2, ...) + if ok then + return ret + end + end + end end function Aptechka.SetupFrame(header, frameName)