From ca2dd78a217d0ba2082e5614009edca7d5f23f6b Mon Sep 17 00:00:00 2001 From: leaf corcoran Date: Tue, 5 Feb 2013 08:45:00 -0800 Subject: [PATCH] move position of original line number in rewritten stack trace, fixes #75 --- moonscript/errors.lua | 4 ++-- moonscript/errors.moon | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/moonscript/errors.lua b/moonscript/errors.lua index 85266cf..58d1d9c 100644 --- a/moonscript/errors.lua +++ b/moonscript/errors.lua @@ -80,10 +80,10 @@ rewrite_traceback = function(text, err) fname, ":", reverse_line_number(fname, tbl, line, cache), + ": ", "(", line, - ")", - ": ", + ") ", msg }) else diff --git a/moonscript/errors.moon b/moonscript/errors.moon index c74f69d..3bba447 100644 --- a/moonscript/errors.moon +++ b/moonscript/errors.moon @@ -62,8 +62,9 @@ rewrite_traceback = (text, err) -> concat { fname, ":" reverse_line_number(fname, tbl, line, cache) - "(", line, ")" - ": ", msg + ": " + "(", line, ") " + msg } else trace