Software /
code /
prosody
Comparison
util/xml.lua @ 11127:1d9cd1abc660
util.xml: Fix float formatting of line and columns in error (on Lua 5.3+)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 03 Oct 2020 16:22:56 +0200 |
parent | 8555:4f0f5b49bb03 |
child | 12121:2162e86029b6 |
comparison
equal
deleted
inserted
replaced
11126:cc6b1dab01a2 | 11127:1d9cd1abc660 |
---|---|
69 if ok then ok, err, line, col = parser:parse(); end | 69 if ok then ok, err, line, col = parser:parse(); end |
70 --parser:close(); | 70 --parser:close(); |
71 if ok then | 71 if ok then |
72 return stanza.tags[1]; | 72 return stanza.tags[1]; |
73 else | 73 else |
74 return ok, err.." (line "..line..", col "..col..")"; | 74 return ok, ("%s (line %d, col %d))"):format(err, line, col); |
75 end | 75 end |
76 end; | 76 end; |
77 end)(); | 77 end)(); |
78 | 78 |
79 return { | 79 return { |