aboutsummaryrefslogtreecommitdiff
path: root/pretty_errors.moon
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-09-14 19:17:09 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2018-09-14 19:17:16 -0700
commite22c35681f90740b4f5006c30b3f154ebd1f8ea2 (patch)
treec7f04d968bade120ebf75cfa0b9f073602917122 /pretty_errors.moon
parent7112af7cb6ee52f4ef9664db9c03db52d8c73ac9 (diff)
Auto-upgraded everything.
Diffstat (limited to 'pretty_errors.moon')
-rw-r--r--pretty_errors.moon2
1 files changed, 1 insertions, 1 deletions
diff --git a/pretty_errors.moon b/pretty_errors.moon
index b0d81f9..5dafe99 100644
--- a/pretty_errors.moon
+++ b/pretty_errors.moon
@@ -23,7 +23,7 @@ format_error = (err)->
(" ")\rep(err_linepos+#fmt_str\format(0)-1).."╚#{("═")\rep(err_size-2)}╝"
else
(" ")\rep(err_linepos+#fmt_str\format(0)-1).."⬆"
- err_msg = "\027[33;41;1mParse error at #{err.filename}:#{err_linenum}\027[0m"
+ err_msg = "\027[33;41;1mParse error at #{err.filename or '???'}:#{err_linenum}\027[0m"
for i=err_linenum-context,err_linenum-1
if line = string2.line(err.source, i)
err_msg ..= "\n\027[2m#{fmt_str\format(i)}\027[0m#{line}\027[0m"