jello
jello copied to clipboard
Error messages / exceptions sometimes hard to pinpoint to source (missing line numbers)
I already mentioned this in https://github.com/kellyjonbrazil/jello/discussions/57#discussioncomment-5716128 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': '[email protected]', 'website':
'https://github.com/kellyjonbrazil/jc', 'copyrig ... tus` command parser', 'author': 'Kelly Brazil', 'author_email': '[email protected]', '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.