← Back to issue list

ArgumentParsingError for command not found should hint at the command that raised it

View original Github issue

Metadata

Project
craft-cli
Number
#78
Type
issue
State
open
Author
sergiusens
Labels
Created
2022-04-23 01:19:15+00:00
Updated
2025-03-10 18:59:13+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

If the error class had an attribute with the command that raised it we could do more advanced error handling. Right now I am looking into doing it this way: ```python try: cmd.run(...) except ArgumentParsingError as err: if err.__context__.args[0] not in dispatcher.commands.keys(): do_something() else: raise ```

Evaluation history

No evaluation history available.