From dc73a1feef1723cce863c9630ce6cc8fbb55b08e Mon Sep 17 00:00:00 2001 From: shagu Date: Thu, 2 Sep 2021 17:57:50 +0200 Subject: [PATCH] hide-errors: hide and ignore all lua errors --- README.md | 8 +++++--- ShaguTweaks.toc | 1 + mods/hide-errors.lua | 12 ++++++++++++ 3 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 mods/hide-errors.lua diff --git a/README.md b/README.md index 841933a..7476ac3 100644 --- a/README.md +++ b/README.md @@ -28,9 +28,6 @@ Every of the listed features below, can be completely disabled in that menu in c - **Auto Stance** *Automatically switch to the required warrior or druid stance on spell cast.* -- **Tooltip Details** - *Display health, class color, guild name, guild rank and current target on unit tooltips.* - - **Blue Shaman Class Colors** *Changes the class color code of shamans to blue, as known from TBC+.* @@ -49,6 +46,9 @@ Every of the listed features below, can be completely disabled in that menu in c - **Item Rarity Borders** *Show item rarity as the border color on bags, bank, character and inspect frames.* +- **Tooltip Details** + *Display health, class color, guild name, guild rank and current target on unit tooltips.* + - **MiniMap Clock** *Adds a small 24h clock to the mini map.* @@ -91,6 +91,8 @@ Every of the listed features below, can be completely disabled in that menu in c - **WorldMap Window** *Turns the world map into a movable window. The map can be scaled with \ + Mousewheel.* +- **Hide Errors** + *Hides and ignores all Lua errors produced by broken addons.* ![preview](img/castbars.jpg) *Target Frame Castbars* diff --git a/ShaguTweaks.toc b/ShaguTweaks.toc index 62db42c..263ffbf 100644 --- a/ShaguTweaks.toc +++ b/ShaguTweaks.toc @@ -52,3 +52,4 @@ mods\health-numbers.lua mods\auto-dismount.lua mods\auto-stance.lua mods\tooltip-details.lua +mods\hide-errors.lua diff --git a/mods/hide-errors.lua b/mods/hide-errors.lua new file mode 100644 index 0000000..f51d41d --- /dev/null +++ b/mods/hide-errors.lua @@ -0,0 +1,12 @@ +local _G = _G or getfenv(0) + +local module = ShaguTweaks:register({ + title = "Hide Errors", + description = "Hides and ignores all Lua errors produced by broken addons.", + enabled = nil, +}) + +module.enable = function(self) + error = function() return end + seterrorhandler(error) +end