Elektra  0.9.7
Functions
error.h File Reference

Elektra error. More...

#include "types.h"
#include <kdb.h>
#include <stdbool.h>
Include dependency graph for error.h:
This graph shows which files directly or indirectly include this file:

Functions

ElektraError * elektraErrorPureWarning (void)
 Creates a dummy ElektraError struct to store warnings in. More...
 
const char * elektraErrorCode (const ElektraError *error)
 
const char * elektraErrorDescription (const ElektraError *error)
 
void elektraErrorReset (ElektraError **error)
 Frees the memory used by the error and sets the referenced error variable to NULL.
 
ElektraError * elektraErrorConversionToString (KDBType sourceType, const char *keyname)
 Creates a "Conversion to string failed" error. More...
 
ElektraError * elektraErrorConversionFromString (KDBType targetType, const char *keyname, const char *sourceValue)
 Creates a "Conversion from string failed" error. More...
 

Detailed Description

Elektra error.

Function Documentation

◆ elektraErrorConversionFromString()

ElektraError* elektraErrorConversionFromString ( KDBType  targetType,
const char *  keyname,
const char *  sourceValue 
)

Creates a "Conversion from string failed" error.

Parameters
targetTypeThe type into which sourceValue couldn't be converted.
keynameThe name of the key that couldn't be converted.
sourceValueThe value that couldn't be converted.
Returns
A newly allocated ElektraError (free with elektraErrorReset()).

◆ elektraErrorConversionToString()

ElektraError* elektraErrorConversionToString ( KDBType  sourceType,
const char *  keyname 
)

Creates a "Conversion to string failed" error.

Parameters
sourceTypeThe type which failed to be converted to string.
keynameThe name of the key that couldn't be converted.
Returns
A newly allocated ElektraError (free with elektraErrorReset()).