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

Error messages / exceptions sometimes hard to pinpoint to source (missing line numbers) #63

Open
g-v-egidy opened this issue May 13, 2023 · 1 comment
Labels
enhancement New feature or request ready-to-ship

Comments

@g-v-egidy
Copy link

I already mentioned this in #57 (reply in thread) and now wanted to back this up with a proper example.

So with most python exceptions occurring within jello I find it hard to pinpoint them to the part of the query source they come from. My main issue is that they don't show any line number.

For example here:

# jc -a | jello "ret=_['version']['not a dict error']; ret"
jello:  Query Exception:  TypeError
        string indices must be integers
        query:  ret=_['version']['not a dict error']; ret
        data:  {'name': 'jc', 'version': '1.23.1', 'description': 'JSON Convert', 'author': 'Kelly Brazil', 'author_email': 'kellyjonbrazil@gmail.com', 'website':
            'https://github.com/kellyjonbrazil/jc', 'copyrig ... tus` command parser', 'author': 'Kelly Brazil', 'author_email': 'kellyjonbrazil@gmail.com', 'compatible': ['linux', 'darwin',
            'freebsd'], 'tags': ['command'], 'magic_commands': ['zpool status']}]}

Now this is of course a minimal example with just one line. But consider you have like 10 or 20 lines of code there. Then line numbers in the error message would really help.

@kellyjonbrazil
Copy link
Owner

Thanks for the PR - looks great!

@kellyjonbrazil kellyjonbrazil added ready-to-ship enhancement New feature or request labels May 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ready-to-ship
Projects
None yet
Development

No branches or pull requests

2 participants