Main Page | Modules | Data Structures | File List | Data Fields | Globals

Error Handling


Enumerations

enum  GS_ERROR {
  GS_OK = 0, GS_ERROR_WINSOCK, GS_ERROR_UNKNOWNTYPE, GS_ERROR_UNKNOWNHOST,
  GS_ERROR_CONNECT, GS_ERROR_TIMEOUT, GS_ERROR_CORRUPT, GS_ERROR_UNKNOWNPORT,
  GS_ERROR_NOTIMPLEMENTED, GS_ERROR_INVALIDPARAMETER
}
 Error types. More...

Functions

unsigned short GSLastError (void)
 Retrieves information on the last error, if any.
const char * GSErrorString (unsigned short err)
 Translates an error code into a human-readable string.
const char * GSLastErrorString (void)
 Retrieves information on the last error, if any.

Enumeration Type Documentation

enum GS_ERROR
 

Error types.

Enumeration values:
GS_OK  Everything went okay.
GS_ERROR_WINSOCK  An internal Windows Sockets error occured.
GS_ERROR_UNKNOWNTYPE  Unknown server type.
GS_ERROR_UNKNOWNHOST  Unable to resolve host or invalid IP.
GS_ERROR_CONNECT  Unable to connect to host.
GS_ERROR_TIMEOUT  Connection timed out, host may be unreachable.
GS_ERROR_CORRUPT  Unknown or currupt response recieved.
GS_ERROR_UNKNOWNPORT  Could not determine the server port.
GS_ERROR_NOTIMPLEMENTED  Function not yet implemented.
GS_ERROR_INVALIDPARAMETER  Invalid parameter.


Function Documentation

const char* GSErrorString unsigned short  err  ) 
 

Translates an error code into a human-readable string.

Parameters:
err The error code to retrieve.
Returns:
The string associated with the error, or NULL on an invalid error code.

unsigned short GSLastError void   ) 
 

Retrieves information on the last error, if any.

Returns:
The error code of the last error. If no error has occured, GS_OK.
See also:
GS_ERROR, GSLastErrorString()

const char* GSLastErrorString void   ) 
 

Retrieves information on the last error, if any.

Returns:
A human-readable string representing the last error to occur.
Note:
This is equivalent to calling GSErrorString(GSLastError())


Generated on Wed Oct 6 01:04:06 2004 for GameStat by  doxygen 1.3.9