| Elektra 0.11.0

Functions
errors.c File Reference

Used for writing the error/warning information into a key to be used for emitting messages to the user. More...

`#include <kdberrors.h>`
`#include <kdbprivate.h>`
`#include <stdio.h>`
`#include <string.h>`

## Functions
void | elektraCopyError (Key *target, Key *source)
| Copy the error from the source key to target key.
void | elektraCopyWarnings (Key *target, Key *source)
| Copy the warnings from the source key to target key.
void | elektraCopyErrorAndWarnings (Key *target, Key *source)
| Copies the error and warnings from the source key to the target key.

## Detailed Description

Used for writing the error/warning information into a key to be used for emitting messages to the user.

Copyright
  BSD License (see doc/COPYING or https://www.libelektra.org)

## Function Documentation

## ◆ elektraCopyError()

void elektraCopyError | ( | Key * | target,
|  | Key * | source
| ) |  |

Copy the error from the source key to target key.

Parameters

  target | append error to this key
  source | copy error from this key

## ◆ elektraCopyErrorAndWarnings()

void elektraCopyErrorAndWarnings | ( | Key * | target,
|  | Key * | source
| ) |  |

Copies the error and warnings from the source key to the target key.

Note that only 100 warnings can be had. If we exceed that, we'll override the existing warnings in the target key

Parameters

  target | copy error and warnings to this key
  source | copy error and warnings from this key

## ◆ elektraCopyWarnings()

void elektraCopyWarnings | ( | Key * | target,
|  | Key * | source
| ) |  |

Copy the warnings from the source key to target key.

Note that only 100 warnings can be had. If we exceed that, we'll override the existing warnings in the target key.

Parameters

  target | append warnings to this key
  source | copy warnings from this key