Files
ShagaTweaks/mods/hide-errors.lua
T
shagu 6c26bc6190 core: don't rely on sane global environment
some addons like to provide a broken _G variable to
the global environment breaking every other addon that
relies on it if existing. With this commit, make ShaguTweaks
no longer re-use the global _G, even if existing.
2022-11-19 16:59:12 +01:00

14 lines
349 B
Lua

local _G = ShaguTweaks.GetGlobalEnv()
local module = ShaguTweaks:register({
title = "Hide Errors",
description = "Hides and ignores all Lua errors produced by broken addons.",
expansions = { ["vanilla"] = true, ["tbc"] = true },
enabled = nil,
})
module.enable = function(self)
error = function() return end
seterrorhandler(error)
end