diff options
author | Case Duckworth | 2024-04-10 23:42:47 -0500 |
---|---|---|
committer | Case Duckworth | 2024-04-10 23:42:47 -0500 |
commit | 180b6c6b5885e6a6e62d39221d5bccc12daaf485 (patch) | |
tree | dbfee8455a9875f46d60339438da99be8cc09930 /util.lua | |
parent | Change tostring to type.string (diff) | |
download | lam-180b6c6b5885e6a6e62d39221d5bccc12daaf485.tar.gz lam-180b6c6b5885e6a6e62d39221d5bccc12daaf485.zip |
Add -> functions to core
Diffstat (limited to 'util.lua')
-rw-r--r-- | util.lua | 6 |
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" |
12 | function m.error (desc, ...) | 12 | function 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 | )) |
15 | end | 19 | end |
16 | 20 | ||