Skip to content

Conversation

@RaphaelIT7
Copy link
Collaborator

This disastrous abomination of unholy code solves the current issue CFC-Servers/gmod_tests#25 is having
When you pass a function to pcall that will error directly, Lua has no idea what the name of it is, causing the error message to include '?' instead of for example 'Left'
This tries to fix that issue, it's bad, but it works really well in my testing.

And no, simply using debug.getinfo to get the name does not work, as the name will not be set for the subject so I fell back to reading the file to figure out the name :/
There probably is a better way, though this is the best that I came up, it may be a disaster, but it's a functional one :3

@RaphaelIT7 RaphaelIT7 force-pushed the patch-18 branch 3 times, most recently from 9696b27 to 9ce7b8f Compare October 27, 2025 11:36
	modified:   utils/caller_recovery.lua
	modified:   ../../tests/gluatest/expectations/callerRecovery.lua
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant