On Tue, 2 Dec 2025 at 06:03, Max Chernoff <[email protected]> wrote:
> Hi Luigi,
>
> Any errors in a "texlua" script only print an error message, not a full
> traceback. Demonstration:
>
> $ cat ./texlua-traceback.lua
> #!/usr/bin/env texlua
> local function test_function()
> error("Unhandled error")
> end
>
> test_function()
>
> $ texlua ./texlua-traceback.lua
> ./texlua-traceback.lua:3: Unhandled error
>
> This is because if a texlua script fails, "luainit.c" calls
> "lua_traceback()" without printing the message that it produces. I've
> attached a patch that changes it so that a full traceback message is
> printed, meaning that running the above example now produces the
> following output:
>
> $ texlua ./texlua-traceback.lua
> ./texlua-traceback.lua:3: Unhandled error
> stack traceback:
> [C]: in function 'error'
> ./texlua-traceback.lua:3: in local 'test_function'
> ./texlua-traceback.lua:6: in main chunk
>
>
Ok, I will check it this weekend (or before, if I can).
--
luigi
_______________________________________________
dev-luatex mailing list -- [email protected]
To unsubscribe send an email to [email protected]