libguac  0.9.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Macros | Enumerations | Functions
error.h File Reference

Provides functions and structures required for handling return values and errors. More...

Go to the source code of this file.

Macros

#define guac_error   (*__guac_error())
 Returns the status code associated with the error which occurred during the last function call.
#define guac_error_message   (*__guac_error_message())
 Returns a message describing the error which occurred during the last function call.

Enumerations

enum  guac_status {
  GUAC_STATUS_SUCCESS = 0, GUAC_STATUS_NO_MEMORY, GUAC_STATUS_NO_INPUT, GUAC_STATUS_INPUT_TIMEOUT,
  GUAC_STATUS_SEE_ERRNO, GUAC_STATUS_OUTPUT_ERROR, GUAC_STATUS_BAD_ARGUMENT, GUAC_STATUS_BAD_STATE
}
 Return codes shared by all Guacamole functions which can fail. More...

Functions

const char * guac_status_string (guac_status status)
 Returns a human-readable explanation of the status code given.

Detailed Description

Provides functions and structures required for handling return values and errors.

Macro Definition Documentation

#define guac_error   (*__guac_error())

Returns the status code associated with the error which occurred during the last function call.

This value will only be set by functions documented to use it (most libguac functions), and is undefined if no error occurred.

The storage of this value is thread-local. Assignment of a status code to guac_error in one thread will not affect its value in another thread.

#define guac_error_message   (*__guac_error_message())

Returns a message describing the error which occurred during the last function call.

If an error occurred, but no message is associated with it, NULL is returned. This value is undefined if no error occurred.

The storage of this value is thread-local. Assignment of a message to guac_error_message in one thread will not affect its value in another thread.

Enumeration Type Documentation

Return codes shared by all Guacamole functions which can fail.

Enumerator:
GUAC_STATUS_SUCCESS 

No errors occurred and the operation was successful.

GUAC_STATUS_NO_MEMORY 

Insufficient memory to complete the operation.

GUAC_STATUS_NO_INPUT 

The end of the input stream associated with the operation has been reached.

GUAC_STATUS_INPUT_TIMEOUT 

A timeout occurred while reading from the input stream associated with the operation.

GUAC_STATUS_SEE_ERRNO 

An error occurred, and further information about the error is already stored in errno.

GUAC_STATUS_OUTPUT_ERROR 

An error prevented the operation from writing to its associated output stream.

GUAC_STATUS_BAD_ARGUMENT 

The operation could not be performed because an invalid argument was given.

GUAC_STATUS_BAD_STATE 

The state of the associated system prevents an operation from being performed which would otherwise be allowed.