Skip to content
Snippets Groups Projects
Commit 0819f535 authored by DarkGod's avatar DarkGod
Browse files

if addon hook file has syntax errors, report it

parent b8987542
No related branches found
No related tags found
No related merge requests found
......@@ -644,7 +644,8 @@ You may try to force loading if you are sure the savefile does not use that addo
table.insert(_G.__addons_fn_superloads[add][bname], f)
end
end)(addname)
local f = loadfile(dir.."/load.lua")
local f, err = loadfile(dir.."/load.lua")
if not f and err then error(err) end
setfenv(f, setmetatable({superload = superload, __addon_name = addname}, {__index = _G}))
f()
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment