300 end |
300 end |
301 |
301 |
302 function loop() |
302 function loop() |
303 -- Error handler for errors that make it this far |
303 -- Error handler for errors that make it this far |
304 local function catch_uncaught_error(err) |
304 local function catch_uncaught_error(err) |
305 if type(err) == "string" and err:match("%d*: interrupted!$") then |
305 if type(err) == "string" and err:match("interrupted!$") then |
306 return "quitting"; |
306 return "quitting"; |
307 end |
307 end |
308 |
308 |
309 log("error", "Top-level error, please report:\n%s", tostring(err)); |
309 log("error", "Top-level error, please report:\n%s", tostring(err)); |
310 local traceback = debug.traceback("", 2); |
310 local traceback = debug.traceback("", 2); |