Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: include table name in error message #19

Open
arcpaolo opened this issue Jul 9, 2023 · 0 comments
Open

Enhancement: include table name in error message #19

arcpaolo opened this issue Jul 9, 2023 · 0 comments

Comments

@arcpaolo
Copy link

arcpaolo commented Jul 9, 2023

REQUEST: include the name of the table when throwing an extension runtime error

I am a big fan of tables and use them heavily in my code.

When I try to access non-existent key in a table with table:get, the resulting error message tells me the name of the key I am trying to access, but not the name of the table. Here is an example of a recent error:

Extension exception: No value for Fashion1 in table.
error while observer running TABLE:GET
called by ....

However, this particular call came from inside a very long procedure that is passed as an anonymous command through a foreach, and the key ("Fashion1") is inside a variable which itself came from another table. The procedure has more than a dozen "table:get" statements including some nested tables. As a result, the error message does not help me pinpoint the line where the error is occurring. It just took me a good 30 minutes of setting break points to figure out where the error was being generated. This has now happened a few times - often the offending procedure is shorter and I have been able to figure it out more quickly, but occasionally it has been very painful.

It would be awesome if in this and other error messages you could also print out the name of the table, to spare us the time of having to figure it out.

Thank you.

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

No branches or pull requests

1 participant