Error Reporting

Error Reporting — Standard error messages.

Synopsis




gchar*      gtcp_error_get_lookup_status_message
                                            (GTcpLookupStatus status,
                                             const gchar *address);
gchar*      gtcp_error_get_connection_status_message
                                            (GTcpConnectionStatus status,
                                             const gchar *address,
                                             guint port);
gchar*      gtcp_error_get_server_open_status_message
                                            (GTcpServerOpenStatus status,
                                             guint port);

Description

These functions provide a way to convert status codes into standardized error strings, suitable for display in a dialog box.

Details

gtcp_error_get_lookup_status_message ()

gchar*      gtcp_error_get_lookup_status_message
                                            (GTcpLookupStatus status,
                                             const gchar *address);

Allocates a properly formatted error message for the DNS lookup status, suitable for use in an error message or dialog. The returned string should be freed when it is no longer needed.

status : the GTcpLookupStatus for this connection.
address : the remote address attempted.
Returns : an error string for status.

Since 1.0


gtcp_error_get_connection_status_message ()

gchar*      gtcp_error_get_connection_status_message
                                            (GTcpConnectionStatus status,
                                             const gchar *address,
                                             guint port);

Allocates a properly formatted error message for the connection status, suitable for use in an error message or dialog. The returned string should be freed when it is no longer needed.

status : the GTcpConnectionStatus for this connection.
address : the remote address attempted.
port : the remote port attempted.
Returns : an error string for status.

Since 1.0


gtcp_error_get_server_open_status_message ()

gchar*      gtcp_error_get_server_open_status_message
                                            (GTcpServerOpenStatus status,
                                             guint port);

Allocates a properly formatted error message for the open status, suitable for use in an error message or dialog. The returned string should be freed when it is no longer needed.

status : the GTcpServerOpenStatus for this server.
port : the local port attempted.
Returns : an error string for status.

Since 1.0