diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2019-01-19 19:38:12 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2019-01-19 19:38:29 -0800 |
| commit | 0538b869be2af79f19d21dfe51d8a24d4fe7eb61 (patch) | |
| tree | 3152e53b57d4c938279e8c150227a74ada54a9f4 /pretty_errors.lua | |
| parent | 6ffd38b5117f00339a5da04c1a5d0c5092e42d3c (diff) | |
Added error line column to error messages.
Diffstat (limited to 'pretty_errors.lua')
| -rw-r--r-- | pretty_errors.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pretty_errors.lua b/pretty_errors.lua index afb1793..addb42b 100644 --- a/pretty_errors.lua +++ b/pretty_errors.lua @@ -25,7 +25,7 @@ format_error = function(err) else pointer = (" "):rep(err_linepos + #fmt_str:format(0) - 1) .. "⬆" end - local err_msg = "\027[33;41;1m" .. tostring(err.title or "Error") .. " at " .. tostring(err.filename or '???') .. ":" .. tostring(err_linenum) .. "\027[0m" + local err_msg = "\027[33;41;1m" .. tostring(err.title or "Error") .. " at " .. tostring(err.filename or '???') .. ":" .. tostring(err_linenum) .. "," .. tostring(err_linepos) .. "\027[0m" for i = err_linenum - context, err_linenum - 1 do do local line = string2.line(err.source, i) |
