Error Reporting

Error Reporting — Error types, domains, and functions.

Synopsis




#define     GNETWORK_DNS_ERROR
enum        GNetworkDnsError;
G_CONST_RETURN gchar* gnetwork_dns_strerror (GNetworkDnsError error);
#define     GNETWORK_CONNECTION_ERROR
enum        GNetworkConnectionError;
G_CONST_RETURN gchar* gnetwork_connection_strerror
                                            (GNetworkConnectionError error);
#define     GNETWORK_SERVER_ERROR
enum        GNetworkServerError;
G_CONST_RETURN gchar* gnetwork_server_strerror
                                            (GNetworkServerError error);
#define     GNETWORK_TCP_PROXY_ERROR
enum        GNetworkTcpProxyError;
#define     GNETWORK_SSL_ERROR
enum        GNetworkSslError;
#define     GNETWORK_SSL_CERT_ERROR
enum        GNetworkSslCertErrorFlags;
#define     GNETWORK_DATAGRAM_ERROR
enum        GNetworkDatagramError;
#define     GNETWORK_UDP_DATAGRAM_ERROR
enum        GNetworkUdpDatagramError;
#define     GNETWORK_IP_MULTICAST_ERROR
enum        GNetworkIpMulticastError;

Description

These are the error domains, types, and strerror-like functions that the GNetwork library uses.

Details

GNETWORK_DNS_ERROR

#define GNETWORK_DNS_ERROR		(gnetwork_dns_error_get_quark ())

The GQuark error domain for GNetworkDnsError.


enum GNetworkDnsError

typedef enum /* <prefix=GNETWORK_DNS_ERROR> */
{
  GNETWORK_DNS_ERROR_INTERNAL,

  GNETWORK_DNS_ERROR_NOT_FOUND,
  GNETWORK_DNS_ERROR_NO_RECOVERY,
  GNETWORK_DNS_ERROR_TRY_AGAIN
}
GNetworkDnsError;

An enumeration of the possible DNS lookup errors.

GNETWORK_DNS_ERROR_INTERNALthere was an error in the GNetwork library.
GNETWORK_DNS_ERROR_NOT_FOUNDthe host record was not found.
GNETWORK_DNS_ERROR_NO_RECOVERYthe DNS server is down.
GNETWORK_DNS_ERROR_TRY_AGAINthe DNS server is busy.

gnetwork_dns_strerror ()

G_CONST_RETURN gchar* gnetwork_dns_strerror (GNetworkDnsError error);

Retrieves a string message corresponding to error. The returned data should not be modified or freed.

error : the DNS error code to use.
Returns : a string message.

Since 1.0


GNETWORK_CONNECTION_ERROR

#define GNETWORK_CONNECTION_ERROR		(gnetwork_connection_error_get_quark ())

The GQuark error domain for GNetworkConnectionError.


enum GNetworkConnectionError

typedef enum /* <prefix=GNETWORK_CONNECTION_ERROR> */
{
  GNETWORK_CONNECTION_ERROR_INTERNAL,

  GNETWORK_CONNECTION_ERROR_REFUSED,
  GNETWORK_CONNECTION_ERROR_TIMEOUT,
  GNETWORK_CONNECTION_ERROR_UNREACHABLE,
  GNETWORK_CONNECTION_ERROR_PERMISSIONS
}
GNetworkConnectionError;

An enumeration of common errors for GNetworkConnection implementations.

GNETWORK_CONNECTION_ERROR_INTERNALthere was a (bizarre) error inside GNetwork.
GNETWORK_CONNECTION_ERROR_REFUSEDthe connection was refused.
GNETWORK_CONNECTION_ERROR_TIMEOUTthe connection timed out.
GNETWORK_CONNECTION_ERROR_UNREACHABLEthe server could not be reached.
GNETWORK_CONNECTION_ERROR_PERMISSIONSthe connection was stopped because it violated some security policy.

gnetwork_connection_strerror ()

G_CONST_RETURN gchar* gnetwork_connection_strerror
                                            (GNetworkConnectionError error);

Retrieves a string message describing error. The returned data should not be modified or freed.

error : the connection error code to use.
Returns : the string message describing error.

Since 1.0


GNETWORK_SERVER_ERROR

#define GNETWORK_SERVER_ERROR		(gnetwork_server_error_get_quark ())

The GQuark error domain for GNetworkServerError.


enum GNetworkServerError

typedef enum /* <prefix=GNETWORK_SERVER_ERROR> */
{
  GNETWORK_SERVER_ERROR_INTERNAL,

  GNETWORK_SERVER_ERROR_TOO_MANY_CONNECTIONS,

  GNETWORK_SERVER_ERROR_NO_MEMORY,
  GNETWORK_SERVER_ERROR_PERMISSIONS,
  GNETWORK_SERVER_ERROR_TOO_MANY_PROCESSES,
  GNETWORK_SERVER_ERROR_ALREADY_EXISTS
}
GNetworkServerError;

An enumeration of common errors for GNetworkServer implementations.

GNETWORK_SERVER_ERROR_INTERNALthere was a (bizarre) eror inside GNetwork.
GNETWORK_SERVER_ERROR_TOO_MANY_CONNECTIONSthere are too many connections open to accept the new incoming connection.
GNETWORK_SERVER_ERROR_NO_MEMORYthere is not enough memory to open a server.
GNETWORK_SERVER_ERROR_PERMISSIONSthe server does not permission to use the requested resource.
GNETWORK_SERVER_ERROR_TOO_MANY_PROCESSESthere are too many running applications to open a server.
GNETWORK_SERVER_ERROR_ALREADY_EXISTSthere is aready a server listening on the requested resource.

gnetwork_server_strerror ()

G_CONST_RETURN gchar* gnetwork_server_strerror
                                            (GNetworkServerError error);

Retrieves an error message string for error. The returned value should not be modified or freed.

error : the server error code to use.
Returns : the error message for error.

Since 1.0


GNETWORK_TCP_PROXY_ERROR

#define GNETWORK_TCP_PROXY_ERROR	(gnetwork_tcp_proxy_error_get_quark ())

The GQuark error domain for GNetworkTcpProxyError.


enum GNetworkTcpProxyError

typedef enum			/* < prefix=GNETWORK_TCP_PROXY_ERROR > */
{
  GNETWORK_TCP_PROXY_ERROR_UNKNOWN,

  GNETWORK_TCP_PROXY_ERROR_CONNECTION_REFUSED,
  GNETWORK_TCP_PROXY_ERROR_TIMEOUT,
  GNETWORK_TCP_PROXY_ERROR_NETWORK_UNREACHABLE,
  GNETWORK_TCP_PROXY_ERROR_FIREWALL,

  GNETWORK_TCP_PROXY_ERROR_ABORTED,
  GNETWORK_TCP_PROXY_ERROR_AUTHENTICATION_FAILED,

  GNETWORK_TCP_PROXY_ERROR_SERVER_FAILED
}
GNetworkTcpProxyError;

Possible errors while traversing a proxy.

GNETWORK_TCP_PROXY_ERROR_UNKNOWNthere was an error inside GNetwork.
GNETWORK_TCP_PROXY_ERROR_CONNECTION_REFUSEDthe proxy server refused to allow us to connect.
GNETWORK_TCP_PROXY_ERROR_TIMEOUTthe connection to the proxy server timed out.
GNETWORK_TCP_PROXY_ERROR_NETWORK_UNREACHABLEthe network the proxy server is on is unreachable.
GNETWORK_TCP_PROXY_ERROR_FIREWALLthe proxy server is blocked by a firewall rule.
GNETWORK_TCP_PROXY_ERROR_ABORTEDthe proxy server closed the connection before we could finish connecting.
GNETWORK_TCP_PROXY_ERROR_AUTHENTICATION_FAILEDthe proxy server could not verify our identity (bad password, username, etc.)
GNETWORK_TCP_PROXY_ERROR_SERVER_FAILEDthe proxy server is throwing a fit :-).

GNETWORK_SSL_ERROR

#define GNETWORK_SSL_ERROR	(gnetwork_ssl_error_get_quark ())

The GQuark error domain for GNetworkSslError.


enum GNetworkSslError

typedef enum /* <prefix=GNETWORK_SSL_ERROR> */
{
  GNETWORK_SSL_ERROR_INTERNAL,

  GNETWORK_SSL_ERROR_TRY_AGAIN,
  GNETWORK_SSL_ERROR_INTERRUPTED,
  GNETWORK_SSL_ERROR_UNSUPPORTED_PROTOCOL,
  GNETWORK_SSL_ERROR_PROTOCOL_ALERT,
  GNETWORK_SSL_ERROR_HANDSHAKE_FAILED,
  GNETWORK_SSL_ERROR_AUTHENTICATION_FAILED
}
GNetworkSslError;

An enumeration of possible SSL errors.

GNETWORK_SSL_ERROR_INTERNALan internal error in the GNetwork library.
GNETWORK_SSL_ERROR_TRY_AGAINthe last action should be tried again.
GNETWORK_SSL_ERROR_INTERRUPTEDthe last action could not be completed.
GNETWORK_SSL_ERROR_UNSUPPORTED_PROTOCOLthe requested SSL protocol version is not supported by the destination.
GNETWORK_SSL_ERROR_PROTOCOL_ALERT
GNETWORK_SSL_ERROR_HANDSHAKE_FAILEDthe handshake could not be completed.
GNETWORK_SSL_ERROR_AUTHENTICATION_FAILED

GNETWORK_SSL_CERT_ERROR

#define     GNETWORK_SSL_CERT_ERROR

The GQuark error domain for GNetworkSslCertErrorFlags.


enum GNetworkSslCertErrorFlags

typedef enum /* <flags,prefix=GNETWORK_SSL_CERT_ERROR> */
{
  GNETWORK_SSL_CERT_ERROR_UNKNOWN           = 0,

  GNETWORK_SSL_CERT_ERROR_NO_CERTIFICATE    = (1 << 0),
  GNETWORK_SSL_CERT_ERROR_INVALID           = (1 << 1),
  GNETWORK_SSL_CERT_ERROR_UNSIGNED          = (1 << 2),
  GNETWORK_SSL_CERT_ERROR_NOT_TRUSTED       = (1 << 3),
  GNETWORK_SSL_CERT_ERROR_REVOKED           = (1 << 4),
  GNETWORK_SSL_CERT_ERROR_CORRUPTED         = (1 << 5),
  GNETWORK_SSL_CERT_ERROR_UNSUPPORTED_TYPE  = (1 << 6),
  GNETWORK_SSL_CERT_ERROR_EXPIRED           = (1 << 7),
  GNETWORK_SSL_CERT_ERROR_NOT_ACTIVATED     = (1 << 8),
  GNETWORK_SSL_CERT_ERROR_HOSTNAME_MISMATCH = (1 << 9),

  GNETWORK_SSL_CERT_ERROR_CANNOT_PARSE      = (1 << 10)
}
GNetworkSslCertErrorFlags;

A bitwise flag for possible problems with certificates.

GNETWORK_SSL_CERT_ERROR_UNKNOWNthere is an unknown problem.
GNETWORK_SSL_CERT_ERROR_NO_CERTIFICATEa certificate was expected but none was received.
GNETWORK_SSL_CERT_ERROR_INVALIDthe certificate is invalid.
GNETWORK_SSL_CERT_ERROR_UNSIGNEDthe certificate was not signed by anyone else.
GNETWORK_SSL_CERT_ERROR_NOT_TRUSTEDthe certificate's signer is not trusted.
GNETWORK_SSL_CERT_ERROR_REVOKEDthe certificate has been revoked by one or more of the authorities which signed it.
GNETWORK_SSL_CERT_ERROR_CORRUPTEDthe certificate is broken.
GNETWORK_SSL_CERT_ERROR_UNSUPPORTED_TYPEthe certificate is not in X.509 format.
GNETWORK_SSL_CERT_ERROR_EXPIREDthe certificate has expired.
GNETWORK_SSL_CERT_ERROR_NOT_ACTIVATEDthe certificate does not become active until a later date.
GNETWORK_SSL_CERT_ERROR_HOSTNAME_MISMATCHthe hostname of the certificate and the hostname set on the authentication scheme are not the same.
GNETWORK_SSL_CERT_ERROR_CANNOT_PARSEthe certificate could not be parsed.

GNETWORK_DATAGRAM_ERROR

#define GNETWORK_DATAGRAM_ERROR		  (gnetwork_datagram_error_get_quark ())

The GQuark error domain for GNetworkDatagramError.


enum GNetworkDatagramError

typedef enum /* <prefix=GNETWORK_DATAGRAM_ERROR> */
{
  GNETWORK_DATAGRAM_ERROR_INTERNAL,

  GNETWORK_DATAGRAM_ERROR_UNREACHABLE,
  GNETWORK_DATAGRAM_ERROR_PERMISSIONS,
  GNETWORK_DATAGRAM_ERROR_ALREADY_EXISTS
}
GNetworkDatagramError;

An enumeration of common errors for GNetworkDatagram implementations.

GNETWORK_DATAGRAM_ERROR_INTERNALthere was an error inside the object.
GNETWORK_DATAGRAM_ERROR_UNREACHABLEthe destination could
GNETWORK_DATAGRAM_ERROR_PERMISSIONSthere was a security-related problem.
GNETWORK_DATAGRAM_ERROR_ALREADY_EXISTSthe socket could not be opened because another object or application is already using it.

GNETWORK_UDP_DATAGRAM_ERROR

#define GNETWORK_UDP_DATAGRAM_ERROR	      (gnetwork_udp_datagram_error_get_quark ())

The GQuark error domain for GNetworkUdpDatagramError.


enum GNetworkUdpDatagramError

typedef enum
{
  GNETWORK_UDP_DATAGRAM_ERROR_CANNOT_SET_TTL,
  GNETWORK_UDP_DATAGRAM_ERROR_CANNOT_SET_BROADCAST,
  GNETWORK_UDP_DATAGRAM_ERROR_CANNOT_SET_REUSE
}
GNetworkUdpDatagramError;

An enumeration of possible errors in the GNetworkUdpDatagram object.

GNETWORK_UDP_DATAGRAM_ERROR_CANNOT_SET_TTLthe time-to-live socket option could not be set.
GNETWORK_UDP_DATAGRAM_ERROR_CANNOT_SET_BROADCASTthe broadcast socket option could not be set (cannot multicast)
GNETWORK_UDP_DATAGRAM_ERROR_CANNOT_SET_REUSEthe socket could not be placed in "re-use" mode (no other applications may now bind to that interface and port).

GNETWORK_IP_MULTICAST_ERROR

#define GNETWORK_IP_MULTICAST_ERROR	      (gnetwork_ip_multicast_error_get_quark ())

The GQuark error domain for GNetworkIpMulticastError.


enum GNetworkIpMulticastError

typedef enum
{
  GNETWORK_IP_MULTICAST_ERROR_CANNOT_SET_TTL,
  GNETWORK_IP_MULTICAST_ERROR_CANNOT_SET_LOOPBACK,
  GNETWORK_IP_MULTICAST_ERROR_JOIN_FAILED,
  GNETWORK_IP_MULTICAST_ERROR_LEAVE_FAILED,
  GNETWORK_IP_MULTICAST_ERROR_UNSUPPORTED_INTERFACE,
  GNETWORK_IP_MULTICAST_ERROR_IPV6_NOT_SUPPORTED
}
GNetworkIpMulticastError;

An enumeration of possible errors in the GNetworkIpMulticast object.

GNETWORK_IP_MULTICAST_ERROR_CANNOT_SET_TTLthe multicast time-to-live socket option could not be set.
GNETWORK_IP_MULTICAST_ERROR_CANNOT_SET_LOOPBACKthe "fast echo" (loopback) socket option could not be set.
GNETWORK_IP_MULTICAST_ERROR_JOIN_FAILEDthe requested group could not be joined.
GNETWORK_IP_MULTICAST_ERROR_LEAVE_FAILEDthe requested group could not be left.
GNETWORK_IP_MULTICAST_ERROR_UNSUPPORTED_INTERFACEthe interface the object is using does not support multicasting.
GNETWORK_IP_MULTICAST_ERROR_IPV6_NOT_SUPPORTED