aboutsummaryrefslogtreecommitdiff
path: root/error_handling.lua
diff options
context:
space:
mode:
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