core: add option to disable addon errors

This commit is contained in:
shagu
2020-07-23 18:40:05 +02:00
parent 73c81ae0fd
commit 82c2107f42
3 changed files with 7 additions and 1 deletions
+5 -1
View File
@@ -330,7 +330,11 @@ print = message
error = function(msg)
if PF_DEBUG_MODE then message(debugstack()) end
DEFAULT_CHAT_FRAME:AddMessage("|cffcc3333ERROR: |cffff5555".. (msg or "nil" ))
if string.find(msg, "AddOns\\pfUI") then
DEFAULT_CHAT_FRAME:AddMessage("|cffcc3333ERROR: |cffff5555".. (msg or "nil" ))
elseif not pfUI_config or (pfUI_config.global and pfUI_config.global.errors == "1") then
DEFAULT_CHAT_FRAME:AddMessage("|cffcc3333ERROR: |cffff5555".. (msg or "nil" ))
end
end
seterrorhandler(error)