about summary refs log tree commit diff stats
path: root/util.lua
diff options
context:
space:
mode:
authorCase Duckworth2024-04-10 23:42:47 -0500
committerCase Duckworth2024-04-10 23:42:47 -0500
commit180b6c6b5885e6a6e62d39221d5bccc12daaf485 (patch)
treedbfee8455a9875f46d60339438da99be8cc09930 /util.lua
parentChange tostring to type.string (diff)
downloadlam-180b6c6b5885e6a6e62d39221d5bccc12daaf485.tar.gz
lam-180b6c6b5885e6a6e62d39221d5bccc12daaf485.zip
Add -> functions to core
Diffstat (limited to 'util.lua')
-rw-r--r--util.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/util.lua b/util.lua index 10460a2..a13912c 100644 --- a/util.lua +++ b/util.lua
@@ -10,7 +10,11 @@ m.luaerror = error
10-- WHERE is where in the process; DESC is a description of the error; the rest 10-- WHERE is where in the process; DESC is a description of the error; the rest
11-- are "irritants" 11-- are "irritants"
12function m.error (desc, ...) 12function m.error (desc, ...)
13 m.luaerror(string.format("%s: %s", desc, table.concat({...}, " ") 13 local irritants = {}
14 for _, i in ipairs({...}) do
15 table.insert(irritants, tostring(i))
16 end
17 m.luaerror(string.format("%s: %s", desc, table.concat(irritants, ", ")
14 )) 18 ))
15end 19end
16 20