91
91
<div class="refsect2">
92
92
<a name="g-io-error-from-errno"></a><h3>g_io_error_from_errno ()</h3>
93
93
<pre class="programlisting"><a class="link" href="gio-GIOError.html#GIOErrorEnum" title="enum GIOErrorEnum"><span class="returnvalue">GIOErrorEnum</span></a>
94
g_io_error_from_errno (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> err_no</code></em>);</pre>
95
<p>Converts errno.h error codes into GIO error codes.</p>
94
g_io_error_from_errno (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> err_no</code></em>);</pre>
95
<p>Converts errno.h error codes into GIO error codes. The fallback
96
value <a class="link" href="gio-GIOError.html#G-IO-ERROR-FAILED:CAPS"><code class="literal">G_IO_ERROR_FAILED</code></a> is returned for error codes not currently
97
handled (but note that future GLib releases may return a more
98
specific value instead).</p>
96
99
<div class="refsect3">
97
100
<a name="id-1.4.2.6.7.2.5"></a><h4>Parameters</h4>
98
101
<div class="informaltable"><table width="100%" border="0">
118
121
<div class="refsect2">
119
122
<a name="g-io-error-from-win32-error"></a><h3>g_io_error_from_win32_error ()</h3>
120
123
<pre class="programlisting"><a class="link" href="gio-GIOError.html#GIOErrorEnum" title="enum GIOErrorEnum"><span class="returnvalue">GIOErrorEnum</span></a>
121
g_io_error_from_win32_error (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> error_code</code></em>);</pre>
122
<p>Converts some common error codes into GIO error codes. The
123
fallback value G_IO_ERROR_FAILED is returned for error codes not
124
g_io_error_from_win32_error (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> error_code</code></em>);</pre>
125
<p>Converts some common error codes into GIO error codes. The fallback
126
value <a class="link" href="gio-GIOError.html#G-IO-ERROR-FAILED:CAPS"><code class="literal">G_IO_ERROR_FAILED</code></a> is returned for error codes not currently
127
handled (but note that future GLib releases may return a more
128
specific value instead).</p>
125
129
<div class="refsect3">
126
130
<a name="id-1.4.2.6.7.3.5"></a><h4>Parameters</h4>
127
131
<div class="informaltable"><table width="100%" border="0">
152
156
<pre class="programlisting">#define G_IO_ERROR g_io_error_quark()
154
158
<p>Error domain for GIO. Errors in this domain will be from the <a class="link" href="gio-GIOError.html#GIOErrorEnum" title="enum GIOErrorEnum"><span class="type">GIOErrorEnum</span></a> enumeration.
155
See <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for more information on error domains.</p>
159
See <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for more information on error domains.</p>
158
162
<div class="refsect2">
159
163
<a name="GIOErrorEnum"></a><h3>enum GIOErrorEnum</h3>
160
164
<p>Error codes returned by GIO functions.</p>
165
<p>Note that this domain may be extended in future GLib releases. In
166
general, new error codes either only apply to new APIs, or else
167
replace <a class="link" href="gio-GIOError.html#G-IO-ERROR-FAILED:CAPS"><span class="type">G_IO_ERROR_FAILED</span></a> in cases that were not explicitly
168
distinguished before. You should therefore avoid writing code like</p>
169
<div class="informalexample">
170
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
173
<td class="listing_lines" align="right"><pre>1
178
<td class="listing_code"><pre class="programlisting"><span class="keyword">if</span> <span class="gtkdoc opt">(</span><span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#g-error-matches">g_error_matches</a></span> <span class="gtkdoc opt">(</span>error<span class="gtkdoc opt">,</span> G_IO_ERROR<span class="gtkdoc opt">,</span> G_IO_ERROR_FAILED<span class="gtkdoc opt">))</span>
179
<span class="gtkdoc opt">{</span>
180
<span class="gtkdoc slc">// Assume that this is EPRINTERONFIRE</span>
181
<span class="gtkdoc opt">...</span>
182
<span class="gtkdoc opt">}</span></pre></td>
189
but should instead treat all unrecognized error codes the same as
190
<a class="link" href="gio-GIOError.html#G-IO-ERROR-FAILED:CAPS"><span class="type">G_IO_ERROR_FAILED</span></a>.</p>
161
191
<div class="refsect3">
162
<a name="id-1.4.2.6.8.3.4"></a><h4>Members</h4>
192
<a name="id-1.4.2.6.8.3.7"></a><h4>Members</h4>
163
193
<div class="informaltable"><table width="100%" border="0">
165
195
<col width="300px" class="enum_members_name">
171
201
<td class="enum_member_name"><p><a name="G-IO-ERROR-FAILED:CAPS"></a>G_IO_ERROR_FAILED</p></td>
172
202
<td class="enum_member_description">
173
<p>Generic error condition for when any operation fails.</p>
203
<p>Generic error condition for when an operation fails
204
and no more specific <a class="link" href="gio-GIOError.html#GIOErrorEnum" title="enum GIOErrorEnum"><span class="type">GIOErrorEnum</span></a> value is defined.</p>
175
206
<td class="enum_member_annotations"> </td>
426
457
<td class="enum_member_name"><p><a name="G-IO-ERROR-DBUS-ERROR:CAPS"></a>G_IO_ERROR_DBUS_ERROR</p></td>
427
458
<td class="enum_member_description">
428
459
<p>A remote object generated an error that
429
doesn't correspond to a locally registered <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> error
460
doesn't correspond to a locally registered <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> error
430
461
domain. Use <a class="link" href="gio-GDBusError.html#g-dbus-error-get-remote-error" title="g_dbus_error_get_remote_error ()"><code class="function">g_dbus_error_get_remote_error()</code></a> to extract the D-Bus
431
462
error name and <a class="link" href="gio-GDBusError.html#g-dbus-error-strip-remote-error" title="g_dbus_error_strip_remote_error ()"><code class="function">g_dbus_error_strip_remote_error()</code></a> to fix up the
432
463
message so it matches what was received on the wire. Since 2.26.</p>