Exceptions
godotkit raises errors by one rule:
| Situation | Exception |
|---|---|
| A bad argument (an invalid version string, an unknown option) | ValueError |
A path that doesn't exist (an engine folder, a binary, project.godot) |
FileNotFoundError |
| The current OS or CPU isn't supported | NotImplementedError |
| An operation that failed (a download, an extraction, a git command, a release lookup) | a GodotkitError subclass |
Catch GodotkitError to handle every failed operation in one place. The engine errors can also be imported from godotkit.engine, and VersionFileError from godotkit.project.
GodotkitError
Bases: Exception
Base class for errors raised when a godotkit operation fails.
DownloadError
Bases: GodotkitError
A release download failed.
DownloadCancelled
Bases: GodotkitError
A download was stopped by its cancel callback.
ExtractError
Bases: GodotkitError
A downloaded release could not be extracted.
ReleaseNotFoundError
Bases: GodotkitError
No Godot release matches the requested version.
AssetNotFoundError
Bases: GodotkitError
The release exists, but has no editor build for the requested target.
VersionFileError
Bases: GodotkitError, ValueError
A project's .godot-version file holds no valid version.
GitError
Bases: GodotkitError, RuntimeError
A git command failed, or git is not installed.