aboutsummaryrefslogtreecommitdiff
path: root/error_handling.moon
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2019-01-08 16:35:32 -0800
committerBruce Hill <bruce@bruce-hill.com>2019-01-08 16:35:51 -0800
commit1d2bd858fd7479bc672bc0e1be77f30c63f85b0c (patch)
treebc0261091bd95f59f48b3a67eaa21d5e55eb752a /error_handling.moon
parentfc1655e028a93290f5d6a6e99cec56fa9dbaf0bb (diff)
Made the source mapping optional (and disabled with -O2+)
Diffstat (limited to 'error_handling.moon')
-rw-r--r--error_handling.moon2
1 files changed, 1 insertions, 1 deletions
diff --git a/error_handling.moon b/error_handling.moon
index 97e5fe6..46580d6 100644
--- a/error_handling.moon
+++ b/error_handling.moon
@@ -66,7 +66,7 @@ print_error = (error_message, start_fn, stop_fn)->
if calling_fn.linedefined == 0 then name = "main chunk"
if name == "run_lua_fn" then continue
line = nil
- if map = SOURCE_MAP[calling_fn.source]
+ if map = SOURCE_MAP and SOURCE_MAP[calling_fn.source]
if calling_fn.currentline
calling_fn.currentline = assert(map[calling_fn.currentline])
if calling_fn.linedefined