-
Notifications
You must be signed in to change notification settings - Fork 76
Open
Description
Seems like we could improve the error message. Maybe try/except
and print --help
message on exception?
> chatdbg --version
Traceback (most recent call last):
File "/usr/local/bin/chatdbg", line 8, in <module>
sys.exit(main())
^^^^^^
File "/ChatDBG/src/chatdbg/__main__.py", line 37, in main
ipdb.__main__.main()
File "/usr/local/lib/python3.12/dist-packages/ipdb/__main__.py", line 275, in main
opts, args = getopt.getopt(sys.argv[1:], 'mhc:', ['help', 'command='])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/getopt.py", line 93, in getopt
opts, args = do_longs(opts, args[0][2:], longopts, args[1:])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/getopt.py", line 157, in do_longs
has_arg, opt = long_has_args(opt, longopts)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/getopt.py", line 174, in long_has_args
raise GetoptError(_('option --%s not recognized') % opt, opt)
getopt.GetoptError: option --version not recognized
Metadata
Metadata
Assignees
Labels
No labels