From af507f7f7ac5fba15fcbf67fcc700daf8f86d0be Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Tue, 18 Dec 2018 17:35:27 -0800 Subject: Added fallback for if there is a source without an endpoint. --- error_handling.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'error_handling.lua') 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 -- cgit v1.2.3