dnxError.c File Reference

Implements the DNX Error Reporting functions. More...

#include "dnxError.h"
#include <errno.h>
#include <string.h>

Go to the source code of this file.

Defines

#define elemcount(x)   (sizeof(x)/sizeof(*(x)))

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.

Variables

static dnxError gLastError = DNX_OK


Detailed Description

Implements the DNX Error Reporting functions.

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

Definition in file dnxError.c.


Define Documentation

#define elemcount (  )     (sizeof(x)/sizeof(*(x)))

Definition at line 37 of file dnxError.c.


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.

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.


Variable Documentation

dnxError gLastError = DNX_OK [static]

Last known error code.

Definition at line 39 of file dnxError.c.

Referenced by dnxGetLastError(), and dnxSetLastError().


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