diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2018-12-15 15:15:03 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2018-12-15 15:15:10 -0800 |
| commit | 79881757fb924ce1e776f3d8e429eb3e0e185d18 (patch) | |
| tree | 73724b0bec4507ae2a7d8185f489a9efcdeeadfe /pretty_errors.lua | |
| parent | 17fc0a0e3870030dc5db5e14c0a798b65ef7e557 (diff) | |
Truncating super long error messages.
Diffstat (limited to 'pretty_errors.lua')
| -rw-r--r-- | pretty_errors.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pretty_errors.lua b/pretty_errors.lua index f5de557..afb1793 100644 --- a/pretty_errors.lua +++ b/pretty_errors.lua @@ -58,6 +58,10 @@ format_error = function(err) end end end + if i > err_linenum + 1 + 5 then + err_msg = err_msg .. "\n ...\n" + break + end end end local box_width = 70 |
