craft_cli.errors module¶
Error classes.
- exception craft_cli.errors.CraftError(message: str, *, details: str | None = None, resolution: str | None = None, docs_url: str | None = None, logpath_report: bool = True, reportable: bool = True, retcode: int = 1)[source]¶
Bases:
Exception
Signal a program error with a lot of information to report.
- message: str¶
The main message to the user, to be shown as first line (and probably only that, according to the different modes); note that in some cases the log location will be attached to this message.
- details: str | None¶
The full error details received from a third party which originated the error situation.
- resolution: str | None¶
An extra line indicating to the user how the error may be fixed or avoided (to be shown together with
message
).
- docs_url: str | None¶
An URL to point the user to documentation (to be shown together with
message
).
- logpath_report: bool¶
Whether the location of the log filepath should be presented in the screen as the final message.
- reportable: bool¶
If an error report should be sent to some error-handling backend (like Sentry).
- retcode: int¶
The code to return when the application finishes.