Error on attempts to override a missing function

This commit is contained in:
Jason Perkins 2014-12-22 11:52:57 -05:00
parent b47d85390e
commit 25255da22d

View File

@ -153,6 +153,9 @@
function premake.override(scope, name, repl)
local original = scope[name]
if not original then
error("unable to override '" .. name .. "'; no such function", 2)
end
scope[name] = function(...)
return repl(original, ...)
end