mirror of
https://github.com/brues-code/pfUI.git
synced 2026-11-09 11:48:57 +00:00
Load each module and skin through securecallfunction so one error no longer stops the rest from loading
This commit is contained in:
@@ -345,14 +345,16 @@ function pfUI:RegisterSkin(name, func, arg3)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- an error in one module or skin goes to the error handler without
|
||||||
|
-- stopping the ones that load after it
|
||||||
function pfUI:LoadModule(m)
|
function pfUI:LoadModule(m)
|
||||||
setfenv(pfUI.module[m], pfUI:GetEnvironment())
|
setfenv(pfUI.module[m], pfUI:GetEnvironment())
|
||||||
pfUI.module[m]()
|
securecallfunction(pfUI.module[m])
|
||||||
end
|
end
|
||||||
|
|
||||||
function pfUI:LoadSkin(s)
|
function pfUI:LoadSkin(s)
|
||||||
setfenv(pfUI.skin[s], pfUI:GetEnvironment())
|
setfenv(pfUI.skin[s], pfUI:GetEnvironment())
|
||||||
pfUI.skin[s]()
|
securecallfunction(pfUI.skin[s])
|
||||||
end
|
end
|
||||||
|
|
||||||
pfUI:SetScript("OnEvent", function()
|
pfUI:SetScript("OnEvent", function()
|
||||||
|
|||||||
Reference in New Issue
Block a user