1
0
Fork 0
mirror of https://github.com/Reuh/candran.git synced 2025-10-27 09:59:29 +00:00

Handle static import errors in can

This commit is contained in:
Étienne Fildadut 2021-06-18 14:23:45 +02:00
parent 008e7732bc
commit d4102f1af6
3 changed files with 97 additions and 81 deletions

View file

@ -320,6 +320,7 @@ end
--- Candran error message handler.
-- Use it in xpcall to rewrite stacktraces to display Candran source file lines instead of compiled Lua lines.
function candran.messageHandler(message, noTraceback)
message = tostring(message)
if not noTraceback and not message:match("\nstack traceback:\n") then
message = debug.traceback(message, 2)
end