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
Thanks,
-- Max