Miscellaneous Utility Functions

Name

Error Utility Functions -- error functions and error codes.

Synopsis

#include <tiffep.h> (error.h, errcodes.h)


DLLEXPORTed functions:

gint        tiffep_get_error                (gint err_num,
                                             gchar *error_msg);


Definitions:

#define     ERR_NONE                        0
#define     ERR_IPC_KEY
#define     ERR_SHM_GET
#define     ERR_SHM_ATT
#define     ERR_SHM_DTCH
#define     ERR_SHM_RMID
#define     ERR_CREATE_FILEMAP
#define     ERR_MAP_FILE
#define     ERR_UNMAP_FILE
#define     ERR_SCK_SOCKET
#define     ERR_SCK_BIND
#define     ERR_SCK_LISTEN
#define     ERR_SCK_ACCEPT
#define     ERR_SCK_CONNECT
#define     ERR_SCK_SEND
#define     ERR_SCK_RECEIVE
#define     ERR_FILE_OPEN
#define     ERR_INVALID_FILE
#define     ERR_PARSE_FILE
#define     ERR_NOT_FOUND
#define     ERR_CMD_INVALID
#define     ERR_INVALID_TYPE
#define     ERR_PLG_NOT_FOUND

Description

These are portable utility functions.

Details

tiffep_get_error ()

gint        tiffep_get_error                (gint err_num,
                                             gchar *error_msg);

This function put in error_msg the error message corresponding to error code passed in err_num.
If the error code has been catched, the function returns 0 else it returns the passed error code for propagation.

 
err_num : the error code to convert.
error_msg :
the returned error message
Returns : 0 if error catched, the error code otherwise.