diff options
| author | Sunil Nimmagadda <sunil@nimmagadda.net> | 2026-10-31 09:10:04 +0530 |
|---|---|---|
| committer | Sunil Nimmagadda <sunil@nimmagadda.net> | 2026-10-31 09:17:05 +0530 |
| commit | c8347f16c672792eb21f6d707e7f483290bfe8ee (patch) | |
| tree | 3572130c65a1f9e482a9080e4ea8db157ca82ec7 /mkelf.lua | |
| parent | a4c87e8e0c68bc2c68bcca14e5c007c6f07bab53 (diff) | |
Provide an index in the error message.
Diffstat (limited to 'mkelf.lua')
| -rw-r--r-- | mkelf.lua | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -42,9 +42,9 @@ local function loadconfig(fn) if type(t) ~= "table" then error("segments must be a table", 2) end - for _, segment in ipairs(t) do + for i, segment in ipairs(t) do if type(segment) ~= "table" then - error("segment must be a table", 2) + error(("segment #%d must be a table"):format(i), 2) end segment = setmetatable(segment, segment_mt) segment:normalize() @@ -56,9 +56,9 @@ local function loadconfig(fn) if type(t) ~= "table" then error("sections must be a table", 2) end - for _, section in ipairs(t) do + for i, section in ipairs(t) do if type(section) ~= "table" then - error("section must be a table", 2) + error(("section #%d must be a table"):format(i), 2) end section = setmetatable(section, section_mt) section:normalize() |
