Use specific ArgumentParsingError for argument parsing errors (CRAFT-473).
Metadata
Current evaluation
Merged. Introduces a dedicated ArgumentParsingError to replace the overloaded CommandError, simplifying help handling and preparing for craft-cli integration. Changes span five files.
Suggested action: —
No scores available.
Issue body
This is in preparation for the integration of craft-cli handling messages. This way, the original CommandError is not overloaded just to react differently when the only intended result is to show a "command parsing help" message to the user.
Also the HelpCommand itself is now simplified to show a message when the intended result is to show the message (the command itself functioning well) and only raise an exception when there is actually an error.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged. Introduces a dedicated ArgumentParsingError to replace the overloaded CommandError, simplifying help handling and preparing for craft-cli integration. Changes span five files. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Replaced overloaded CommandError with specific ArgumentParsingError for parsing failures, preparing for craft-cli integration. Simplified HelpCommand to show messages on success and only raise exceptions for actual errors. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Introduces a dedicated ArgumentParsingError to replace the overloaded CommandError for parsing failures, preparing for craft-cli integration. Simplifies HelpCommand to display messages instead of raising exceptions for valid help requests. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #624 Massive renaming of CommandError to CraftError (CRAFT-709). | charmcraft | merged | Merged renaming CommandError to CraftError across 36 files. Imports updated to craft_cli and the old definition removed. A CharmcraftError subclass suggestion was declined, as CraftError already provides sufficient functionality. |