aboutsummaryrefslogtreecommitdiff
path: root/error_handling.lua
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2018-12-18 17:35:27 -0800
committerBruce Hill <bruce@bruce-hill.com>2018-12-18 17:35:42 -0800
commitaf507f7f7ac5fba15fcbf67fcc700daf8f86d0be (patch)
tree220fff4cf05984c50b947add894c3f52413c626a /error_handling.lua
parentec1a1935d6ac475807f149d35b57a059713ea1df (diff)
Added fallback for if there is a source without an endpoint.
Diffstat (limited to 'error_handling.lua')
-rw-r--r--error_handling.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/error_handling.lua b/error_handling.lua
index 33f9764..ba3389a 100644
--- a/error_handling.lua
+++ b/error_handling.lua
@@ -115,6 +115,9 @@ print_error = function(error_message, start_fn, stop_fn)
calling_fn.lastlinedefined = assert(map[calling_fn.lastlinedefined])
end
local filename, start, stop = calling_fn.source:match('@([^[]*)%[([0-9]+):([0-9]+)]')
+ if not filename then
+ filename, start = calling_fn.source:match('@([^[]*)%[([0-9]+)]')
+ end
assert(filename)
local file = files.read(filename)
if calling_fn.name then