File: introduction-errors.html

package info (click to toggle)
packagekit 1.1.5-2%2Bdeb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 15,464 kB
  • sloc: ansic: 56,926; cpp: 8,658; python: 7,641; xml: 6,388; sh: 4,517; perl: 1,738; makefile: 1,437; ruby: 1,341
file content (281 lines) | stat: -rw-r--r-- 9,160 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Error Enums: PackageKit Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="PackageKit Reference Manual">
<link rel="up" href="concepts.html" title="Important Concepts">
<link rel="prev" href="introduction-ideas-filters.html" title="Filters">
<link rel="next" href="introduction-group-type.html" title="Group type">
<meta name="generator" content="GTK-Doc V1.25 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts"></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="concepts.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="introduction-ideas-filters.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="introduction-group-type.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="sect1">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="introduction-errors"></a>Error Enums</h2></div></div></div>
<p>
      If you have to handle an error, try to use <code class="literal">internal-error</code>
      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.
    </p>
<p>
      Every error should have an enumerated type
      (e.g. <code class="literal">out-of-memory</code>) 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 <code class="literal">;</code> to separate the lines if
      required.
    </p>
<p>
      The following error enumerated types are available for use in all
      backends:
    </p>
<div class="informaltable"><table class="informaltable" border="1">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>Error</th>
<th>Description</th>
</tr></thead>
<tbody>
<tr>
<td><code class="literal">out-of-memory</code></td>
<td>There is an out of memory condition</td>
</tr>
<tr>
<td><code class="literal">no-network</code></td>
<td>There is no network connection that can be used</td>
</tr>
<tr>
<td><code class="literal">not-supported</code></td>
<td>
              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.
            </td>
</tr>
<tr>
<td><code class="literal">internal-error</code></td>
<td>
              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.
            </td>
</tr>
<tr>
<td><code class="literal">no-cache</code></td>
<td>
              The operation is trying to read from the cache, but the cache
              is not present or invalid
            </td>
</tr>
<tr>
<td><code class="literal">gpg-failure</code></td>
<td>There was a GPG failure in the transaction</td>
</tr>
<tr>
<td><code class="literal">package-id-invalid</code></td>
<td>The package ID is not valid for this transaction</td>
</tr>
<tr>
<td><code class="literal">package-not-installed</code></td>
<td>
              The package that is trying to be removed or updated is not
              installed
            </td>
</tr>
<tr>
<td><code class="literal">package-not-found</code></td>
<td>
              The package that is trying to be removed or updated is not
              installed
            </td>
</tr>
<tr>
<td><code class="literal">package-already-installed</code></td>
<td>
              The (single) package that is trying to be installed or updated is already
              installed
            </td>
</tr>
<tr>
<td><code class="literal">all-packages-already-installed</code></td>
<td>
	      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.
            </td>
</tr>
<tr>
<td><code class="literal">package-download-failed</code></td>
<td>A package failed to download correctly</td>
</tr>
<tr>
<td><code class="literal">invalid-package-file</code></td>
<td>
	      The file that is supposed to contain a package to
              install is corrupt, or is not a valid package file
	    </td>
</tr>
<tr>
<td><code class="literal">package-install-blocked</code></td>
<td>
	      The backend's configuration or policy prevents the
              install or updating of a package
	    </td>
</tr>
<tr>
<td><code class="literal">dep-resolution-failed</code></td>
<td>Dependency resolution failed</td>
</tr>
<tr>
<td><code class="literal">filter-invalid</code></td>
<td>
              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.
            </td>
</tr>
<tr>
<td><code class="literal">group-not-found</code></td>
<td>
	      The specified software group was not found.
            </td>
</tr>
<tr>
<td><code class="literal">create-thread-failed</code></td>
<td>Failed to create a thread</td>
</tr>
<tr>
<td><code class="literal">transaction-error</code></td>
<td>
              There was a generic transaction error, but please give more
              details in the description
            </td>
</tr>
<tr>
<td><code class="literal">transaction-cancelled</code></td>
<td>
              The transaction was cancelled as the result of a call
              to Cancel()
            </td>
</tr>
<tr>
<td><code class="literal">repo-not-found</code></td>
<td>The repository name could not be found</td>
</tr>
<tr>
<td><code class="literal">repo-configuration-error</code></td>
<td>One of the enabled repositories has invalid configuration</td>
</tr>
<tr>
<td><code class="literal">repo-not-available</code></td>
<td>
	      There was a (possibly transient) problem connecting to a
	      repository
	    </td>
</tr>
<tr>
<td><code class="literal">cannot-remove-system-package</code></td>
<td>
              Could not remove a protected system package that is needed for
              stable operation of the system
            </td>
</tr>
<tr>
<td><code class="literal">process-quit</code></td>
<td>
              The process was asked to quit, probably because it was cancelled
            </td>
</tr>
<tr>
<td><code class="literal">process-kill</code></td>
<td>
              The process was forcibly killed, probably because ignored the
              quit request. This is probably due to it being cancelled
            </td>
</tr>
<tr>
<td><code class="literal">failed-config-parsing</code></td>
<td>
	      Configuration files could not be read or parsed.
            </td>
</tr>
<tr>
<td><code class="literal">cannot-cancel</code></td>
<td>
	      The Cancel() method was called, but it is too late to
	      cancel the current transaction.
            </td>
</tr>
<tr>
<td><code class="literal">cannot-get-lock</code></td>
<td>
	      The backend could not acquire a lock on the underlying
	      package management system.
            </td>
</tr>
<tr>
<td><code class="literal">no-packages-to-update</code></td>
<td>
	      UpdatePackages() was called, but there are no packages to update.
            </td>
</tr>
<tr>
<td><code class="literal">cannot-write-repo-config</code></td>
<td>
	      RepoEnable() or RepoSetData() was called, but the
	      repository configuration file could not be written to.
            </td>
</tr>
<tr>
<td><code class="literal">local-install-failed</code></td>
<td>
	      A local file could not be installed.  The file might not
	      be readable, or it might not contain a valid package.
            </td>
</tr>
<tr>
<td><code class="literal">bad-gpg-signature</code></td>
<td>
	      The package is signed with a GPG signature, but that
	      signature is not valid in some way.
            </td>
</tr>
<tr>
<td><code class="literal">package-corrupt</code></td>
<td>
	      The downloaded package is corrupt.
            </td>
</tr>
<tr>
<td><code class="literal">file-not-found</code></td>
<td>
	      The file could not be found on the system.
            </td>
</tr>
</tbody>
</table></div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25</div>
</body>
</html>