Skip to content

Commit cffb2fc

Browse files
committed
This makes for a cleaner stack trace.
1 parent 2d9bf2a commit cffb2fc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

require.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ local package, p_loaded = package, package.loaded
2626

2727

2828
local sentinel do
29-
local function errhandler() error("the require sentinel can't be indexed or updated") end
29+
local function errhandler() error("the require() sentinel can't be indexed or updated", 2) end
3030
sentinel = newproxy and newproxy() or setmetatable({}, {__index = errhandler, __newindex = errhandler, __metatable = false})
3131
end
3232

0 commit comments

Comments
 (0)