<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 
               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY version SYSTEM "version.xml">
]>
<refentry id="gio-GIOError">
<refmeta>
<refentrytitle role="top_of_page" id="gio-GIOError.top_of_page">GIOError</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GIO Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>GIOError</refname>
<refpurpose>Error helper functions</refpurpose>
</refnamediv>

<refsynopsisdiv id="gio-GIOError.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>

#include &lt;gio/gio.h&gt;

#define             <link linkend="G-IO-ERROR--CAPS">G_IO_ERROR</link>
enum                <link linkend="GIOErrorEnum">GIOErrorEnum</link>;
<link linkend="GIOErrorEnum">GIOErrorEnum</link>        <link linkend="g-io-error-from-errno">g_io_error_from_errno</link>               (<link linkend="gint">gint</link> err_no);
</synopsis>
</refsynopsisdiv>









<refsect1 id="gio-GIOError.description" role="desc">
<title role="desc.title">Description</title>
<para>
Contains helper functions for reporting errors to the user.</para>
<para>
</para>
</refsect1>

<refsect1 id="gio-GIOError.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="G-IO-ERROR--CAPS" role="macro">
<title>G_IO_ERROR</title>
<indexterm zone="G-IO-ERROR--CAPS"><primary sortas="IO_ERROR">G_IO_ERROR</primary></indexterm><programlisting>#define G_IO_ERROR g_io_error_quark()
</programlisting>
<para>
Error domain for GIO. Errors in this domain will be from the <link linkend="GIOErrorEnum"><type>GIOErrorEnum</type></link> enumeration.
See <link linkend="GError"><type>GError</type></link> for more information on error domains.</para>
<para>
</para></refsect2>
<refsect2 id="GIOErrorEnum" role="enum">
<title>enum GIOErrorEnum</title>
<indexterm zone="GIOErrorEnum"><primary sortas="IOErrorEnum">GIOErrorEnum</primary></indexterm><programlisting>typedef enum {
  G_IO_ERROR_FAILED,
  G_IO_ERROR_NOT_FOUND,
  G_IO_ERROR_EXISTS,
  G_IO_ERROR_IS_DIRECTORY,
  G_IO_ERROR_NOT_DIRECTORY,
  G_IO_ERROR_NOT_EMPTY,
  G_IO_ERROR_NOT_REGULAR_FILE,
  G_IO_ERROR_NOT_SYMBOLIC_LINK,
  G_IO_ERROR_NOT_MOUNTABLE_FILE,
  G_IO_ERROR_FILENAME_TOO_LONG,
  G_IO_ERROR_INVALID_FILENAME,
  G_IO_ERROR_TOO_MANY_LINKS,
  G_IO_ERROR_NO_SPACE,
  G_IO_ERROR_INVALID_ARGUMENT,
  G_IO_ERROR_PERMISSION_DENIED,
  G_IO_ERROR_NOT_SUPPORTED,
  G_IO_ERROR_NOT_MOUNTED,
  G_IO_ERROR_ALREADY_MOUNTED,
  G_IO_ERROR_CLOSED,
  G_IO_ERROR_CANCELLED,
  G_IO_ERROR_PENDING,
  G_IO_ERROR_READ_ONLY,
  G_IO_ERROR_CANT_CREATE_BACKUP,
  G_IO_ERROR_WRONG_ETAG,
  G_IO_ERROR_TIMED_OUT,
  G_IO_ERROR_WOULD_RECURSE,
  G_IO_ERROR_BUSY,
  G_IO_ERROR_WOULD_BLOCK,
  G_IO_ERROR_HOST_NOT_FOUND,
  G_IO_ERROR_WOULD_MERGE,
  G_IO_ERROR_FAILED_HANDLED,
  G_IO_ERROR_TOO_MANY_OPEN_FILES,
  G_IO_ERROR_NOT_INITIALIZED,
  G_IO_ERROR_ADDRESS_IN_USE
} GIOErrorEnum;
</programlisting>
<para>
Error codes returned by GIO functions.</para>
<para>
</para><variablelist role="enum">
<varlistentry id="G-IO-ERROR-FAILED--CAPS" role="constant">
<term><literal>G_IO_ERROR_FAILED</literal></term>
<listitem><simpara> Generic error condition for when any operation fails.
</simpara></listitem>
</varlistentry>
<varlistentry id="G-IO-ERROR-NOT-FOUND--CAPS" role="constant">
<term><literal>G_IO_ERROR_NOT_FOUND</literal></term>
<listitem><simpara> File not found error.
</simpara></listitem>
</varlistentry>
<varlistentry id="G-IO-ERROR-EXISTS--CAPS" role="constant">
<term><literal>G_IO_ERROR_EXISTS</literal></term>
<listitem><simpara> File already exists error.
</simpara></listitem>
</varlistentry>
<varlistentry id="G-IO-ERROR-IS-DIRECTORY--CAPS" role="constant">
<term><literal>G_IO_ERROR_IS_DIRECTORY</literal></term>
<listitem><simpara> File is a directory error.
</simpara></listitem>
</varlistentry>
<varlistentry id="G-IO-ERROR-NOT-DIRECTORY--CAPS" role="constant">
<term><literal>G_IO_ERROR_NOT_DIRECTORY</literal></term>
<listitem><simpara> File is not a directory.
</simpara></listitem>
</varlistentry>
<varlistentry id="G-IO-ERROR-NOT-EMPTY--CAPS" role="constant">
<term><literal>G_IO_ERROR_NOT_EMPTY</literal></term>
<listitem><simpara> File is a directory that isn't empty.
</simpara></listitem>
</varlistentry>
<varlistentry id="G-IO-ERROR-NOT-REGULAR-FILE--CAPS" role="constant">
<term><literal>G_IO_ERROR_NOT_REGULAR_FILE</literal></term>
<listitem><simpara> File is not a regular file.
</simpara></listitem>
</varlistentry>
<varlistentry id="G-IO-ERROR-NOT-SYMBOLIC-LINK--CAPS" role="constant">
<term><literal>G_IO_ERROR_NOT_SYMBOLIC_LINK</literal></term>
<listitem><simpara> File is not a symbolic link.
</simpara></listitem>
</varlistentry>
<varlistentry id="G-IO-ERROR-NOT-MOUNTABLE-FILE--CAPS" role="constant">
<term><literal>G_IO_ERROR_NOT_MOUNTABLE_FILE</literal></term>
<listitem><simpara> File cannot be mounted.
</simpara></listitem>
</varlistentry>
<varlistentry id="G-IO-ERROR-FILENAME-TOO-LONG--CAPS" role="constant">
<term><literal>G_IO_ERROR_FILENAME_TOO_LONG</literal></term>
<listitem><simpara> Filename is too many characters.
</simpara></listitem>
</varlistentry>
<varlistentry id="G-IO-ERROR-INVALID-FILENAME--CAPS" role="constant">
<term><literal>G_IO_ERROR_INVALID_FILENAME</literal></term>
<listitem><simpara> Filename is invalid or contains invalid characters.
</simpara></listitem>
</varlistentry>
<varlistentry id="G-IO-ERROR-TOO-MANY-LINKS--CAPS" role="constant">
<term><literal>G_IO_ERROR_TOO_MANY_LINKS</literal></term>
<listitem><simpara> File contains too many symbolic links.
</simpara></listitem>
</varlistentry>
<varlistentry id="G-IO-ERROR-NO-SPACE--CAPS" role="constant">
<term><literal>G_IO_ERROR_NO_SPACE</literal></term>
<listitem><simpara> No space left on drive.
</simpara></listitem>
</varlistentry>
<varlistentry id="G-IO-ERROR-INVALID-ARGUMENT--CAPS" role="constant">
<term><literal>G_IO_ERROR_INVALID_ARGUMENT</literal></term>
<listitem><simpara> Invalid argument.
</simpara></listitem>
</varlistentry>
<varlistentry id="G-IO-ERROR-PERMISSION-DENIED--CAPS" role="constant">
<term><literal>G_IO_ERROR_PERMISSION_DENIED</literal></term>
<listitem><simpara> Permission denied.
</simpara></listitem>
</varlistentry>
<varlistentry id="G-IO-ERROR-NOT-SUPPORTED--CAPS" role="constant">
<term><literal>G_IO_ERROR_NOT_SUPPORTED</literal></term>
<listitem><simpara> Operation not supported for the current backend.
</simpara></listitem>
</varlistentry>
<varlistentry id="G-IO-ERROR-NOT-MOUNTED--CAPS" role="constant">
<term><literal>G_IO_ERROR_NOT_MOUNTED</literal></term>
<listitem><simpara> File isn't mounted.
</simpara></listitem>
</varlistentry>
<varlistentry id="G-IO-ERROR-ALREADY-MOUNTED--CAPS" role="constant">
<term><literal>G_IO_ERROR_ALREADY_MOUNTED</literal></term>
<listitem><simpara> File is already mounted.
</simpara></listitem>
</varlistentry>
<varlistentry id="G-IO-ERROR-CLOSED--CAPS" role="constant">
<term><literal>G_IO_ERROR_CLOSED</literal></term>
<listitem><simpara> File was closed.
</simpara></listitem>
</varlistentry>
<varlistentry id="G-IO-ERROR-CANCELLED--CAPS" role="constant">
<term><literal>G_IO_ERROR_CANCELLED</literal></term>
<listitem><simpara> Operation was cancelled. See <link linkend="GCancellable"><type>GCancellable</type></link>.
</simpara></listitem>
</varlistentry>
<varlistentry id="G-IO-ERROR-PENDING--CAPS" role="constant">
<term><literal>G_IO_ERROR_PENDING</literal></term>
<listitem><simpara> Operations are still pending.
</simpara></listitem>
</varlistentry>
<varlistentry id="G-IO-ERROR-READ-ONLY--CAPS" role="constant">
<term><literal>G_IO_ERROR_READ_ONLY</literal></term>
<listitem><simpara> File is read only.
</simpara></listitem>
</varlistentry>
<varlistentry id="G-IO-ERROR-CANT-CREATE-BACKUP--CAPS" role="constant">
<term><literal>G_IO_ERROR_CANT_CREATE_BACKUP</literal></term>
<listitem><simpara> Backup couldn't be created.
</simpara></listitem>
</varlistentry>
<varlistentry id="G-IO-ERROR-WRONG-ETAG--CAPS" role="constant">
<term><literal>G_IO_ERROR_WRONG_ETAG</literal></term>
<listitem><simpara> File's Entity Tag was incorrect.
</simpara></listitem>
</varlistentry>
<varlistentry id="G-IO-ERROR-TIMED-OUT--CAPS" role="constant">
<term><literal>G_IO_ERROR_TIMED_OUT</literal></term>
<listitem><simpara> Operation timed out.
</simpara></listitem>
</varlistentry>
<varlistentry id="G-IO-ERROR-WOULD-RECURSE--CAPS" role="constant">
<term><literal>G_IO_ERROR_WOULD_RECURSE</literal></term>
<listitem><simpara> Operation would be recursive.
</simpara></listitem>
</varlistentry>
<varlistentry id="G-IO-ERROR-BUSY--CAPS" role="constant">
<term><literal>G_IO_ERROR_BUSY</literal></term>
<listitem><simpara> File is busy.
</simpara></listitem>
</varlistentry>
<varlistentry id="G-IO-ERROR-WOULD-BLOCK--CAPS" role="constant">
<term><literal>G_IO_ERROR_WOULD_BLOCK</literal></term>
<listitem><simpara> Operation would block.
</simpara></listitem>
</varlistentry>
<varlistentry id="G-IO-ERROR-HOST-NOT-FOUND--CAPS" role="constant">
<term><literal>G_IO_ERROR_HOST_NOT_FOUND</literal></term>
<listitem><simpara> Host couldn't be found (remote operations).
</simpara></listitem>
</varlistentry>
<varlistentry id="G-IO-ERROR-WOULD-MERGE--CAPS" role="constant">
<term><literal>G_IO_ERROR_WOULD_MERGE</literal></term>
<listitem><simpara> Operation would merge files.
</simpara></listitem>
</varlistentry>
<varlistentry id="G-IO-ERROR-FAILED-HANDLED--CAPS" role="constant">
<term><literal>G_IO_ERROR_FAILED_HANDLED</literal></term>
<listitem><simpara> Operation failed and a helper program has 
    already interacted with the user. Do not display any error dialog.
</simpara></listitem>
</varlistentry>
<varlistentry id="G-IO-ERROR-TOO-MANY-OPEN-FILES--CAPS" role="constant">
<term><literal>G_IO_ERROR_TOO_MANY_OPEN_FILES</literal></term>
<listitem><simpara> The current process has too many files 
    open and can't open any more. Duplicate descriptors do count toward 
    this limit. Since 2.20
</simpara></listitem>
</varlistentry>
<varlistentry id="G-IO-ERROR-NOT-INITIALIZED--CAPS" role="constant">
<term><literal>G_IO_ERROR_NOT_INITIALIZED</literal></term>
<listitem><simpara> The object has not been initialized. Since 2.22
</simpara></listitem>
</varlistentry>
<varlistentry id="G-IO-ERROR-ADDRESS-IN-USE--CAPS" role="constant">
<term><literal>G_IO_ERROR_ADDRESS_IN_USE</literal></term>
<listitem><simpara> The requested address is already in use. Since 2.22
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="g-io-error-from-errno" role="function">
<title>g_io_error_from_errno ()</title>
<indexterm zone="g-io-error-from-errno"><primary sortas="io_error_from_errno">g_io_error_from_errno</primary></indexterm><programlisting><link linkend="GIOErrorEnum">GIOErrorEnum</link>        g_io_error_from_errno               (<link linkend="gint">gint</link> err_no);</programlisting>
<para>
Converts errno.h error codes into GIO error codes.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>err_no</parameter>&#160;:</term>
<listitem><simpara> Error number as defined in errno.h.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="GIOErrorEnum"><type>GIOErrorEnum</type></link> value for the given errno.h error number.
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>
