blob: add5b3ceb4a9923548248c5f27b7442be22feae9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#ifndef __ERRORS_H
#define __ERRORS_H
#include "port/sys.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef signed int error_t;
#define OK 0 /* no error, everything is fine */
#define ERR_OUT_OF_MEMORY -1 /* out of memory in malloc */
#define ERR_INVALID_STATE -2 /* the object is called in an illegal moment */
#define ERR_INVALID_VALUE -3 /* invalid parameter to a function */
#define ERR_INTERNAL -4 /* internal error of the object, usualy rare */
#define ERR_PROGRAMMING -5 /* programming mistake, should not happen */
#define ERR_NOT_IMPLEMENTED -6 /* not implemented yet */
#define ERR_TIMEOUT -7 /* timeout */
#ifdef __cplusplus
}
#endif
#endif /* ifndef __ERRORS_H */
|