~ubuntu-branches/ubuntu/oneiric/gconf/oneiric-proposed

« back to all changes in this revision

Viewing changes to doc/gconf/html/gconf-gconf-error.html

  • Committer: Bazaar Package Importer
  • Author(s): Emilio Pozuelo Monfort, Josselin Mouette, Sjoerd Simons, Emilio Pozuelo Monfort
  • Date: 2010-12-06 00:53:14 UTC
  • mfrom: (1.1.25 upstream)
  • mto: (7.3.4 sid)
  • mto: This revision was merged to the branch mainline in revision 58.
  • Revision ID: james.westby@ubuntu.com-20101206005314-uz89yke6r1xfw504
Tags: 2.32.1-1
[ Josselin Mouette ]
* Include patch-translations.mk, bump build-depends accordingly.
* Include 03_error_message.patch in POTFILES.in.
* pt_BR.po: Brazilian Portuguese translation. Closes: #599032.
* fr.po: French translation by Christian Perrier. Closes: #599049.
* da.po: Danish translation by Joe Hansen. Closes: #599125.
* cs.po: Czech translation by Michal Simunek. Closes: #599198.
* update-gconf-defaults: patch from Ubuntu to deal with broken 
  symlinks. Closes: #599393. Thanks Michael Vogt.
* de.po: German translation by Helge Kreutzmann. Closes: #599683.
* sv.po: Swedish translation by Martin Bagge. Closes: #599854.
* 04_manpage.patch: patch from A. Costa. Fixes typos in the manual 
  page. Closes: #600899.

[ Sjoerd Simons ]
* New upstream release
* Bump gobject-introspection to the lastest version to generate the most
  recent .gir version
* debian/patches/03_error_message.patch
  + Removed, merged upstream
* debian/rules:
  + Specify compilation with gtk2

[ Emilio Pozuelo Monfort ]
* Switch to source format 3.0 (quilt).
* debian/patches/*:
  - Updated to apply cleanly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
<head>
4
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
5
<title>GError</title>
6
 
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
 
6
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7
7
<link rel="home" href="index.html" title="GConf Reference Manual">
8
8
<link rel="up" href="ch01.html" title="Using the GConf library">
9
9
<link rel="prev" href="gconf-gconf-engine.html" title="GConfEngine">
38
38
<div class="refsynopsisdiv" title="Synopsis">
39
39
<a name="gconf-gconf-error.synopsis"></a><h2>Synopsis</h2>
40
40
<pre class="synopsis">enum                <a class="link" href="gconf-gconf-error.html#GConfError" title="enum GConfError">GConfError</a>;
41
 
<a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="returnvalue">GError</span></a>*             <a class="link" href="gconf-gconf-error.html#gconf-error-new" title="gconf_error_new ()">gconf_error_new</a>                     (<em class="parameter"><code><a class="link" href="gconf-gconf-error.html#GConfError" title="enum GConfError"><span class="type">GConfError</span></a> en</code></em>,
42
 
                                                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *format</code></em>,
 
41
<a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="returnvalue">GError</span></a>*             <a class="link" href="gconf-gconf-error.html#gconf-error-new" title="gconf_error_new ()">gconf_error_new</a>                     (<em class="parameter"><code><a class="link" href="gconf-gconf-error.html#GConfError" title="enum GConfError"><span class="type">GConfError</span></a> en</code></em>,
 
42
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *format</code></em>,
43
43
                                                         <em class="parameter"><code>...</code></em>);
44
 
<a href="/usr/share/gtk-doc/html/glib/glib-Quarks.html#GQuark"><span class="returnvalue">GQuark</span></a>              <a class="link" href="gconf-gconf-error.html#gconf-error-quark" title="gconf_error_quark ()">gconf_error_quark</a>                   (<em class="parameter"><code><span class="type">void</span></code></em>);
45
 
<span class="returnvalue">void</span>                <a class="link" href="gconf-gconf-error.html#gconf-set-error" title="gconf_set_error ()">gconf_set_error</a>                     (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **err</code></em>,
 
44
<a href="http://library.gnome.org/devel/glib/unstable/glib-Quarks.html#GQuark"><span class="returnvalue">GQuark</span></a>              <a class="link" href="gconf-gconf-error.html#gconf-error-quark" title="gconf_error_quark ()">gconf_error_quark</a>                   (<em class="parameter"><code><span class="type">void</span></code></em>);
 
45
<span class="returnvalue">void</span>                <a class="link" href="gconf-gconf-error.html#gconf-set-error" title="gconf_set_error ()">gconf_set_error</a>                     (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **err</code></em>,
46
46
                                                         <em class="parameter"><code><a class="link" href="gconf-gconf-error.html#GConfError" title="enum GConfError"><span class="type">GConfError</span></a> en</code></em>,
47
 
                                                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *format</code></em>,
 
47
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *format</code></em>,
48
48
                                                         <em class="parameter"><code>...</code></em>);
49
 
<a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="returnvalue">GError</span></a>*             <a class="link" href="gconf-gconf-error.html#gconf-compose-errors" title="gconf_compose_errors ()">gconf_compose_errors</a>                (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *err1</code></em>,
50
 
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *err2</code></em>);
 
49
<a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="returnvalue">GError</span></a>*             <a class="link" href="gconf-gconf-error.html#gconf-compose-errors" title="gconf_compose_errors ()">gconf_compose_errors</a>                (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *err1</code></em>,
 
50
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *err2</code></em>);
51
51
</pre>
52
52
</div>
53
53
<div class="refsect1" title="Description">
54
54
<a name="gconf-gconf-error.description"></a><h2>Description</h2>
55
55
<p>
56
 
The <a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> object is used to report errors that occur in GConf
 
56
The <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> object is used to report errors that occur in GConf
57
57
library routines. All functions that report errors work the same way:
58
58
</p>
59
59
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
60
60
<li class="listitem"><p>
61
 
The last argument to the function is a <a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>**, a pointer to a
62
 
location where a <a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>* can be placed.
 
61
The last argument to the function is a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>**, a pointer to a
 
62
location where a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>* can be placed.
63
63
</p></li>
64
64
<li class="listitem"><p>
65
65
This last argument may be <span class="symbol">NULL</span>, in which case no
67
67
</p></li>
68
68
<li class="listitem"><p>
69
69
If non-<span class="symbol">NULL</span>, the argument should be the address of a
70
 
<a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>* variable, which should be initialized to
 
70
<a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>* variable, which should be initialized to
71
71
<span class="symbol">NULL</span>.
72
72
</p></li>
73
73
<li class="listitem"><p>
74
 
If an error occurs, a <a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> will be allocated and placed in the
75
 
return location; the caller must free the <a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> with
76
 
<a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#g-error-free"><code class="function">g_error_free()</code></a>. If no error occurs, the return location will be
 
74
If an error occurs, a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> will be allocated and placed in the
 
75
return location; the caller must free the <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> with
 
76
<a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#g-error-free"><code class="function">g_error_free()</code></a>. If no error occurs, the return location will be
77
77
left untouched. That is, the test <code class="literal">error != NULL</code>
78
78
should always be a reliable indicator of whether the operation failed.
79
79
</p></li>
86
86
on success. In some cases, a <span class="symbol">NULL</span> return value
87
87
indicates failure. Either way, if the return value indicates failure
88
88
and you passed a non-<span class="symbol">NULL</span> value for the last argument
89
 
to the function, a <a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> will be returned. If the return value
90
 
indicates success, then a <a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> will never be returned.  These
 
89
to the function, a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> will be returned. If the return value
 
90
indicates success, then a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> will never be returned.  These
91
91
relationships are guaranteed; that is, you can reliably use the return
92
 
value to decide whether a <a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> was placed in the return
 
92
value to decide whether a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> was placed in the return
93
93
location. If a function does <span class="emphasis"><em>not</em></span> indicate
94
94
success/failure by return value, you must check whether the
95
 
<a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> is <span class="symbol">NULL</span> to detect errors.
 
95
<a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> is <span class="symbol">NULL</span> to detect errors.
96
96
</p>
97
97
<p>
98
98
Here's a short error handling example:
146
146
<tbody>
147
147
<tr>
148
148
<td><p><a name="GCONF-ERROR-SUCCESS:CAPS"></a><span class="term"><code class="literal">GCONF_ERROR_SUCCESS</code></span></p></td>
149
 
<td>indicates that no error occurred, won't be returned in a <a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>.
 
149
<td>indicates that no error occurred, won't be returned in a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>.
150
150
</td>
151
151
</tr>
152
152
<tr>
235
235
<hr>
236
236
<div class="refsect2" title="gconf_error_new ()">
237
237
<a name="gconf-error-new"></a><h3>gconf_error_new ()</h3>
238
 
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="returnvalue">GError</span></a>*             gconf_error_new                     (<em class="parameter"><code><a class="link" href="gconf-gconf-error.html#GConfError" title="enum GConfError"><span class="type">GConfError</span></a> en</code></em>,
239
 
                                                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *format</code></em>,
 
238
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="returnvalue">GError</span></a>*             gconf_error_new                     (<em class="parameter"><code><a class="link" href="gconf-gconf-error.html#GConfError" title="enum GConfError"><span class="type">GConfError</span></a> en</code></em>,
 
239
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *format</code></em>,
240
240
                                                         <em class="parameter"><code>...</code></em>);</pre>
241
241
<p>
242
242
Creates a new error. Normally the GConf library does this, but you
264
264
</tr>
265
265
<tr>
266
266
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
267
 
<td>newly-allocated <a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>.
 
267
<td>newly-allocated <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>.
268
268
</td>
269
269
</tr>
270
270
</tbody>
273
273
<hr>
274
274
<div class="refsect2" title="gconf_error_quark ()">
275
275
<a name="gconf-error-quark"></a><h3>gconf_error_quark ()</h3>
276
 
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Quarks.html#GQuark"><span class="returnvalue">GQuark</span></a>              gconf_error_quark                   (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
 
276
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Quarks.html#GQuark"><span class="returnvalue">GQuark</span></a>              gconf_error_quark                   (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
277
277
<p>
278
 
Converts the string 'gconf-error-quark' to a <a href="/usr/share/gtk-doc/html/glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> and returns the value.
 
278
Converts the string 'gconf-error-quark' to a <a href="http://library.gnome.org/devel/glib/unstable/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> and returns the value.
279
279
</p>
280
280
<div class="variablelist"><table border="0">
281
281
<col align="left" valign="top">
282
282
<tbody><tr>
283
283
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
284
 
<td>the <a href="/usr/share/gtk-doc/html/glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> representing the string.
 
284
<td>the <a href="http://library.gnome.org/devel/glib/unstable/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> representing the string.
285
285
</td>
286
286
</tr></tbody>
287
287
</table></div>
289
289
<hr>
290
290
<div class="refsect2" title="gconf_set_error ()">
291
291
<a name="gconf-set-error"></a><h3>gconf_set_error ()</h3>
292
 
<pre class="programlisting"><span class="returnvalue">void</span>                gconf_set_error                     (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **err</code></em>,
 
292
<pre class="programlisting"><span class="returnvalue">void</span>                gconf_set_error                     (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **err</code></em>,
293
293
                                                         <em class="parameter"><code><a class="link" href="gconf-gconf-error.html#GConfError" title="enum GConfError"><span class="type">GConfError</span></a> en</code></em>,
294
 
                                                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *format</code></em>,
 
294
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *format</code></em>,
295
295
                                                         <em class="parameter"><code>...</code></em>);</pre>
296
296
<p>
297
297
Internal function.
325
325
<hr>
326
326
<div class="refsect2" title="gconf_compose_errors ()">
327
327
<a name="gconf-compose-errors"></a><h3>gconf_compose_errors ()</h3>
328
 
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="returnvalue">GError</span></a>*             gconf_compose_errors                (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *err1</code></em>,
329
 
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *err2</code></em>);</pre>
 
328
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="returnvalue">GError</span></a>*             gconf_compose_errors                (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *err1</code></em>,
 
329
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *err2</code></em>);</pre>
330
330
<p>
331
331
Internal function.
332
332
</p>