dnxError.h File Reference

Types and definitions for DNX Error management. More...

Go to the source code of this file.

Defines

#define MAX_ERR_STR   1023
 Maximum error string length.
#define DNX_CBCANCEL   -1
 Cancel callback iteration loop.
#define DNX_OK   0
 Success.
#define DNX_ERR_BASE   500
 Base all error values here.
#define DNX_ERR_INVALID   (DNX_ERR_BASE + 1 )
 Invalid arguments or parameters.
#define DNX_ERR_CAPACITY   (DNX_ERR_BASE + 2 )
 Out of channel slots or XML buffer space.
#define DNX_ERR_BADURL   (DNX_ERR_BASE + 3 )
 Invalid, malformed URL.
#define DNX_ERR_ALREADY   (DNX_ERR_BASE + 4 )
 Already init or deinit.
#define DNX_ERR_EXIST   (DNX_ERR_BASE + 5 )
 Channel already exists.
#define DNX_ERR_UNSUPPORTED   (DNX_ERR_BASE + 6 )
 Unsupported protocol.
#define DNX_ERR_MEMORY   (DNX_ERR_BASE + 7 )
 Out of memory.
#define DNX_ERR_OPEN   (DNX_ERR_BASE + 8 )
 Channel open error.
#define DNX_ERR_SIZE   (DNX_ERR_BASE + 9 )
 Message size is out of bounds.
#define DNX_ERR_SEND   (DNX_ERR_BASE + 10)
 Message transmission failure.
#define DNX_ERR_RECEIVE   (DNX_ERR_BASE + 11)
 Message reception failure.
#define DNX_ERR_ADDRESS   (DNX_ERR_BASE + 12)
 Invalid communications address.
#define DNX_ERR_NOTFOUND   (DNX_ERR_BASE + 13)
 Requested resource was not found.
#define DNX_ERR_SYNTAX   (DNX_ERR_BASE + 14)
 Incorrect/invalid XML message.
#define DNX_ERR_THREAD   (DNX_ERR_BASE + 15)
 Thread error.
#define DNX_ERR_TIMEOUT   (DNX_ERR_BASE + 16)
 Timeout.
#define DNX_ERR_BUSY   (DNX_ERR_BASE + 17)
 Resource is busy.
#define DNX_ERR_ACCESS   (DNX_ERR_BASE + 18)
 Access denied.

Typedefs

typedef int dnxError
 A type abstraction for a DNX error value.

Functions

dnxError dnxGetLastError (void)
 Return the last error code stored in the global dnx error variable.
void dnxSetLastError (dnxError eno)
 Set the global dnx error variable to some dnx error value.
char * dnxErrorString (dnxError eno)
 Return an error string that matches a specified dnx error code.


Detailed Description

Types and definitions for DNX Error management.

Author:
Robert W. Ingraham (dnx-devel@lists.sourceforge.net)
Attention:
Please submit patches to http://dnx.sourceforge.net

Definition in file dnxError.h.


Define Documentation

#define DNX_CBCANCEL   -1

Cancel callback iteration loop.

Definition at line 33 of file dnxError.h.

Referenced by dnxStatsForEachNode().

#define DNX_ERR_ACCESS   (DNX_ERR_BASE + 18)

Access denied.

Definition at line 55 of file dnxError.h.

Referenced by dnxCfgParserParse().

#define DNX_ERR_ADDRESS   (DNX_ERR_BASE + 12)

Invalid communications address.

Definition at line 49 of file dnxError.h.

Referenced by dnxTcpOpen(), dnxUdpOpen(), dnxUdpRead(), and dnxWorker().

#define DNX_ERR_ALREADY   (DNX_ERR_BASE + 4 )

Already init or deinit.

Definition at line 41 of file dnxError.h.

#define DNX_ERR_BADURL   (DNX_ERR_BASE + 3 )

Invalid, malformed URL.

Definition at line 40 of file dnxError.h.

Referenced by dnxChanMapUrlParse(), dnxMsgQNew(), dnxTcpNew(), and dnxUdpNew().

#define DNX_ERR_BASE   500

Base all error values here.

Definition at line 36 of file dnxError.h.

Referenced by dnxErrorString().

#define DNX_ERR_BUSY   (DNX_ERR_BASE + 17)

Resource is busy.

Definition at line 54 of file dnxError.h.

#define DNX_ERR_CAPACITY   (DNX_ERR_BASE + 2 )

Out of channel slots or XML buffer space.

Definition at line 39 of file dnxError.h.

Referenced by dnxChanMapFindSlot(), dnxJobListAdd(), dnxXmlAdd(), dnxXmlClose(), dnxXmlEscapeStr(), and dnxXmlUnescapeStr().

#define DNX_ERR_EXIST   (DNX_ERR_BASE + 5 )

Channel already exists.

Definition at line 42 of file dnxError.h.

#define DNX_ERR_INVALID   (DNX_ERR_BASE + 1 )

#define DNX_ERR_MEMORY   (DNX_ERR_BASE + 7 )

#define DNX_ERR_NOTFOUND   (DNX_ERR_BASE + 13)

#define DNX_ERR_OPEN   (DNX_ERR_BASE + 8 )

Channel open error.

Definition at line 45 of file dnxError.h.

Referenced by dnxMsgQOpen(), dnxTcpOpen(), and dnxUdpOpen().

#define DNX_ERR_RECEIVE   (DNX_ERR_BASE + 11)

Message reception failure.

Definition at line 48 of file dnxError.h.

Referenced by dnxMsgQRead(), dnxTcpRead(), and dnxUdpRead().

#define DNX_ERR_SEND   (DNX_ERR_BASE + 10)

Message transmission failure.

Definition at line 47 of file dnxError.h.

Referenced by dnxMsgQWrite(), dnxTcpWrite(), and dnxUdpWrite().

#define DNX_ERR_SIZE   (DNX_ERR_BASE + 9 )

Message size is out of bounds.

Definition at line 46 of file dnxError.h.

#define DNX_ERR_SYNTAX   (DNX_ERR_BASE + 14)

Incorrect/invalid XML message.

Definition at line 51 of file dnxError.h.

Referenced by dnxParseCfgLine(), dnxXmlCmpStr(), dnxXmlGet(), dnxXmlGetTagValue(), dnxXmlUnescapeStr(), parseBool(), and parseIntOrUnsigned().

#define DNX_ERR_THREAD   (DNX_ERR_BASE + 15)

#define DNX_ERR_TIMEOUT   (DNX_ERR_BASE + 16)

#define DNX_ERR_UNSUPPORTED   (DNX_ERR_BASE + 6 )

Unsupported protocol.

Definition at line 43 of file dnxError.h.

Referenced by dnxRegistrar(), and GetMsgHeader().

#define DNX_OK   0

Success.

Definition at line 34 of file dnxError.h.

Referenced by applyCfgSetString(), dnxAgentServer(), dnxAuditJob(), dnxBuildNodeStatsReply(), dnxCfgParserCreate(), dnxChanMapAdd(), dnxChanMapAllocChannel(), dnxChanMapDelete(), dnxChanMapFindName(), dnxChanMapFindSlot(), dnxChanMapInit(), dnxChanMapUrlParse(), dnxCollector(), dnxCollectorCreate(), dnxConnect(), dnxDeregisterNode(), dnxDisconnect(), dnxDispatcher(), dnxDispatcherCreate(), dnxGetNodeRequest(), dnxInitAgent(), dnxJobListAdd(), dnxJobListCollect(), dnxJobListCreate(), dnxJobListExpire(), dnxMakeXID(), dnxMsgQClose(), dnxMsgQInit(), dnxMsgQNew(), dnxMsgQOpen(), dnxMsgQRead(), dnxMsgQWrite(), dnxPluginBaseName(), dnxPluginExecute(), dnxPluginInit(), dnxPluginInternal(), dnxPluginLoad(), dnxPluginLocate(), dnxPluginRegister(), dnxPluginVector(), dnxPostNewJob(), dnxQueueCreate(), dnxQueueGet(), dnxQueueGetWait(), dnxQueueNext(), dnxQueuePut(), dnxRegisterNode(), dnxRegistrar(), dnxRegistrarCreate(), dnxSendJobMsg(), dnxTcpClose(), dnxTcpInit(), dnxTcpNew(), dnxTcpOpen(), dnxTcpRead(), dnxTcpWrite(), dnxTimer(), dnxTimerCreate(), dnxUdpClose(), dnxUdpInit(), dnxUdpNew(), dnxUdpOpen(), dnxUdpRead(), dnxUdpWrite(), dnxWaitForJob(), dnxWaitForMgmtReply(), dnxWaitForMgmtRequest(), dnxWaitForNodeRequest(), dnxWaitForResult(), dnxWlmCreate(), dnxWorker(), dnxXmlAdd(), dnxXmlClose(), dnxXmlCmpStr(), dnxXmlEscapeStr(), dnxXmlGet(), dnxXmlGetTagValue(), dnxXmlOpen(), dnxXmlToString(), dnxXmlUnescapeStr(), ehSvcCheck(), initClientComm(), initWorkerComm(), launchScript(), main(), parseBool(), parseIntOrUnsigned(), parseIntOrUnsignedArray(), parseString(), parseStringArray(), and processCommands().

#define MAX_ERR_STR   1023

Maximum error string length.

Definition at line 31 of file dnxError.h.


Typedef Documentation

typedef int dnxError

A type abstraction for a DNX error value.

Definition at line 58 of file dnxError.h.


Function Documentation

char* dnxErrorString ( dnxError  eno  ) 

Return an error string that matches a specified dnx error code.

Parameters:
[in] eno - the error code for which a string representation is desired.
Returns:
A pointer to a statically allocated string representation of the error code specified in errno.

Definition at line 55 of file dnxError.c.

References DNX_ERR_BASE, and elemcount.

Referenced by dnxAgentServer(), dnxCfgParserParse(), dnxCollector(), dnxCollectorCreate(), dnxDispatcherCreate(), dnxGetNodeRequest(), dnxInitAgent(), dnxPluginInit(), dnxReconfigure(), dnxRegisterNode(), dnxRegistrar(), dnxRegistrarCreate(), dnxSendJobMsg(), dnxServerInit(), dnxTimer(), dnxTimerCreate(), dnxWlmCreate(), dnxWorker(), ehSvcCheck(), initClientComm(), initWorkerComm(), main(), nebmodule_init(), processCommands(), ProcessJobTransferMsg(), and workerCreate().

dnxError dnxGetLastError ( void   ) 

Return the last error code stored in the global dnx error variable.

Returns:
The last error value stored.
Todo:
Create a mechanism for preserving error stack details.

Definition at line 47 of file dnxError.c.

References gLastError.

void dnxSetLastError ( dnxError  eno  ) 

Set the global dnx error variable to some dnx error value.

Parameters:
[in] eno - the value to be set.

Definition at line 51 of file dnxError.c.

References gLastError.


Generated on Tue Apr 13 15:48:07 2010 for DNX by  doxygen 1.5.6