errors.c File Reference

#include <string.h>
#include <parserutils/errors.h>

Go to the source code of this file.

Functions

const char * parserutils_error_to_string (parserutils_error error)
 Convert a parserutils error code to a string.
parserutils_error parserutils_error_from_string (const char *str, size_t len)
 Convert a string representation of an error name to a parserutils error code.


Function Documentation

parserutils_error parserutils_error_from_string ( const char *  str,
size_t  len 
)

Convert a string representation of an error name to a parserutils error code.

Parameters:
str String containing error name
len Length of string (bytes)
Returns:
Error code, or PARSERUTILS_OK if unknown

Definition at line 59 of file errors.c.

References PARSERUTILS_BADENCODING, PARSERUTILS_BADPARM, PARSERUTILS_EOF, PARSERUTILS_FILENOTFOUND, PARSERUTILS_INVALID, PARSERUTILS_NEEDDATA, PARSERUTILS_NOMEM, and PARSERUTILS_OK.

const char* parserutils_error_to_string ( parserutils_error  error  ) 

Convert a parserutils error code to a string.

Parameters:
error The error code to convert
Returns:
Pointer to string representation of error, or NULL if unknown.

Definition at line 18 of file errors.c.

References PARSERUTILS_BADENCODING, PARSERUTILS_BADPARM, PARSERUTILS_EOF, PARSERUTILS_FILENOTFOUND, PARSERUTILS_INVALID, PARSERUTILS_NEEDDATA, PARSERUTILS_NOMEM, and PARSERUTILS_OK.


Generated on Wed Jul 29 11:59:21 2015 for Libparserutils by  doxygen 1.5.6