XenevaOS
Loading...
Searching...
No Matches
Functions
errors.c File Reference
#include <string.h>
#include <parserutils/errors.h>
Include dependency graph for errors.c:

Functions

const char * parserutils_error_to_string (parserutils_error error)
 
parserutils_error parserutils_error_from_string (const char *str, size_t len)
 

Function Documentation

◆ parserutils_error_from_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

Parameters
strString containing error name
lenLength of string (bytes)
Returns
Error code, or PARSERUTILS_OK if unknown

◆ parserutils_error_to_string()

const char * parserutils_error_to_string ( parserutils_error  error)

Convert a parserutils error code to a string

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