On Tue, 2 Dec 2025 at 08:55, luigi scarso <[email protected]> wrote:

>
>
> 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).
>
>

commit 90adb105fce89c1b8025c6e33c3d38cd80e321c6 (HEAD -> master,
origin/master, origin/HEAD)
Author: Luigi Scarso <[email protected]>
Date:   Sat Dec 6 21:06:48 2025 +0100

    fixed Errors in "texlua" do not print a traceback (Max Chernoff)

--
luigi
_______________________________________________
dev-luatex mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to