PackageKit Reference Manual: Error Enums

## Error Enums

If you have to handle an error, try to use `internal-error` as little as possible. Just ask on the mailing list, and we can add some more error enums to cover the type of error in an abstract way as possible.

Every error should have an enumerated type (e.g. `out-of-memory`) and also an error description. The error description is not translated and not converted into the users locale. The error description should be descriptive, as it's for power users and people trying to debug the problem. For instance, "Out of memory" is not helpful as an error description that is reported in a bugzilla, but "Could not create database index" is. For the description use `;` to separate the lines if required.

The following error enumerated types are available for use in all backends:

Error | Description
--- | ---
`out-of-memory` | There is an out of memory condition
`no-network` | There is no network connection that can be used
`not-supported` | Not supported by the backend. NOTE: You shouldn't be setting non-NULL in the compiled backend symbol table if you find yourself using this.
`internal-error` | There was an unspecified internal error. NOTE: Please try and be more specific. If you are using this then we should probably add a new type.
`no-cache` | The operation is trying to read from the cache, but the cache is not present or invalid
`gpg-failure` | There was a GPG failure in the transaction
`package-id-invalid` | The package ID is not valid for this transaction
`package-not-installed` | The package that is trying to be removed or updated is not installed
`package-not-found` | The package that is trying to be removed or updated is not installed
`package-already-installed` | The (single) package that is trying to be installed or updated is already installed
`all-packages-already-installed` | Multiple package installs were attempted, but all of them were already installed. The backend should generate package-already-installed messages (not errors) for each package.
`package-download-failed` | A package failed to download correctly
`invalid-package-file` | The file that is supposed to contain a package to install is corrupt, or is not a valid package file
`package-install-blocked` | The backend's configuration or policy prevents the install or updating of a package
`dep-resolution-failed` | Dependency resolution failed
`filter-invalid` | The filter was invalid. NOTE: syntax checking is done in the backend loader, so you should only use this if the filter is not supported by the backend.
`group-not-found` | The specified software group was not found.
`create-thread-failed` | Failed to create a thread
`transaction-error` | There was a generic transaction error, but please give more details in the description
`transaction-cancelled` | The transaction was cancelled as the result of a call to Cancel()
`repo-not-found` | The repository name could not be found
`repo-configuration-error` | One of the enabled repositories has invalid configuration
`repo-not-available` | There was a (possibly transient) problem connecting to a repository
`cannot-remove-system-package` | Could not remove a protected system package that is needed for stable operation of the system
`process-quit` | The process was asked to quit, probably because it was cancelled
`process-kill` | The process was forcibly killed, probably because ignored the quit request. This is probably due to it being cancelled
`failed-config-parsing` | Configuration files could not be read or parsed.
`cannot-cancel` | The Cancel() method was called, but it is too late to cancel the current transaction.
`cannot-get-lock` | The backend could not acquire a lock on the underlying package management system.
`no-packages-to-update` | UpdatePackages() was called, but there are no packages to update.
`cannot-write-repo-config` | RepoEnable() or RepoSetData() was called, but the repository configuration file could not be written to.
`local-install-failed` | A local file could not be installed. The file might not be readable, or it might not contain a valid package.
`bad-gpg-signature` | The package is signed with a GPG signature, but that signature is not valid in some way.
`package-corrupt` | The downloaded package is corrupt.
`file-not-found` | The file could not be found on the system.