source: libcf/trunk/include/cf_error.h@ 156

Last change on this file since 156 was 156, checked in by cheese, 10 years ago

#1 remove ctxmgr error code

File size: 5.4 KB
Line 
1/**
2 * \file cf_error.h
3 *
4 * \author myusgun <myusgun@gmail.com>
5 *
6 * \brief 오류코드 모음
7 */
8#ifndef __CF_ERROR_H__
9#define __CF_ERROR_H__
10
11#include "cf_base.h"
12
13/** 오류 코드 베이스 넘버 */
14#define CF_ERROR_BASE CF_ERROR * 1000
15
16/* file {{{ */
17#define CF_ERROR_FILE CF_ERROR_BASE * 1
18/*------------------------------------------------------------*/
19#define CF_ERROR_FILE_OPEN CF_ERROR_FILE - 1
20#define CF_ERROR_FILE_INVALID_ARGS CF_ERROR_FILE - 2
21#define CF_ERROR_FILE_READ CF_ERROR_FILE - 3
22#define CF_ERROR_FILE_WRITE CF_ERROR_FILE - 4
23#define CF_ERROR_FILE_CREATE_CTX CF_ERROR_FILE - 5
24#define CF_ERROR_FILE_CLOSE CF_ERROR_FILE - 6
25#define CF_ERROR_FILE_GET_SIZE CF_ERROR_FILE - 7
26#define CF_ERROR_FILE_MAKE_DIRECTORY CF_ERROR_FILE - 8
27#define CF_ERROR_FILE_ALLOCATE_BUFFER CF_ERROR_FILE - 9
28#define CF_ERROR_FILE_INVALID_CTX CF_ERROR_FILE - 10
29/* }}} file */
30
31/* socket {{{ */
32#define CF_ERROR_SOCKET CF_ERROR_BASE * 2
33/*------------------------------------------------------------*/
34#define CF_ERROR_SOCKET_INITIALIZE CF_ERROR_SOCKET - 1
35#define CF_ERROR_SOCKET_NOT_INITIALIZED CF_ERROR_SOCKET - 2
36#define CF_ERROR_SOCKET_FINALIZE CF_ERROR_SOCKET - 3
37#define CF_ERROR_SOCKET_CLOSE CF_ERROR_SOCKET - 4
38#define CF_ERROR_SOCKET_CREATE CF_ERROR_SOCKET - 5
39#define CF_ERROR_SOCKET_CONNECT CF_ERROR_SOCKET - 6
40#define CF_ERROR_SOCKET_SET_OPTION CF_ERROR_SOCKET - 7
41#define CF_ERROR_SOCKET_GET_OPTION CF_ERROR_SOCKET - 8
42#define CF_ERROR_SOCKET_TIMEOUT CF_ERROR_SOCKET - 9
43#define CF_ERROR_SOCKET_INVALID_ARGS CF_ERROR_SOCKET - 10
44#define CF_ERROR_SOCKET_INVALID_SOCKET CF_ERROR_SOCKET - 11
45#define CF_ERROR_SOCKET_GET_HOST CF_ERROR_SOCKET - 12
46#define CF_ERROR_SOCKET_BIND CF_ERROR_SOCKET - 13
47#define CF_ERROR_SOCKET_LISTEN CF_ERROR_SOCKET - 14
48#define CF_ERROR_SOCKET_ACCEPT CF_ERROR_SOCKET - 15
49#define CF_ERROR_SOCKET_SEND CF_ERROR_SOCKET - 16
50#define CF_ERROR_SOCKET_RECV CF_ERROR_SOCKET - 17
51#define CF_ERROR_SOCKET_CHECK_DESC_SET CF_ERROR_SOCKET - 18
52#define CF_ERROR_SOCKET_INVALID_CTX CF_ERROR_SOCKET - 19
53#define CF_ERROR_SOCKET_CREATE_CTX CF_ERROR_SOCKET - 20
54/* }}} socket */
55
56/* thread {{{ */
57#define CF_ERROR_THREAD CF_ERROR_BASE * 3
58/*------------------------------------------------------------*/
59#define CF_ERROR_THREAD_CREATE_CTX CF_ERROR_THREAD - 1
60#define CF_ERROR_THREAD_START CF_ERROR_THREAD - 2
61#define CF_ERROR_THREAD_INVALID_CTX CF_ERROR_THREAD - 3
62#define CF_ERROR_THREAD_INVALID_ARGS CF_ERROR_THREAD - 4
63#define CF_ERROR_THREAD_INIT_ATTR CF_ERROR_THREAD - 5
64#define CF_ERROR_THREAD_SET_INHERIT_SCHED CF_ERROR_THREAD - 6
65#define CF_ERROR_THREAD_SET_SCHED_POLICY CF_ERROR_THREAD - 7
66#define CF_ERROR_THREAD_SET_SCHED_PARAM CF_ERROR_THREAD - 8
67/* }}} thread */
68
69/* mutex {{{ */
70#define CF_ERROR_MUTEX CF_ERROR_BASE * 4
71/*------------------------------------------------------------*/
72#define CF_ERROR_MUTEX_CREATE_CTX CF_ERROR_MUTEX - 1
73#define CF_ERROR_MUTEX_CREATE CF_ERROR_MUTEX - 2
74#define CF_ERROR_MUTEX_INVALID_CTX CF_ERROR_MUTEX - 3
75#define CF_ERROR_MUTEX_INVALID_ARGS CF_ERROR_MUTEX - 4
76/* }}} mutex */
77
78/* debug {{{ */
79#define CF_ERROR_DEBUG CF_ERROR_BASE * 5
80/*------------------------------------------------------------*/
81#define CF_ERROR_DEBUG_INVALID_CTX CF_ERROR_DEBUG - 1
82#define CF_ERROR_DEBUG_PUSH_CALLSTACK CF_ERROR_DEBUG - 2
83#define CF_ERROR_DEBUG_POP_CALLSTACK CF_ERROR_DEBUG - 3
84#define CF_ERROR_DEBUG_PEEK_CALLSTACK CF_ERROR_DEBUG - 4
85#define CF_ERROR_DEBUG_CREATE_CTX CF_ERROR_DEBUG - 5
86/* }}} debug */
87
88/* log {{{ */
89#define CF_ERROR_LOG CF_ERROR_BASE * 6
90/*------------------------------------------------------------*/
91#define CF_ERROR_LOG_INVALID_CTX CF_ERROR_LOG - 1
92#define CF_ERROR_LOG_SET_MULTITHREAD CF_ERROR_LOG - 2
93#define CF_ERROR_LOG_UNSET_MULTITHREAD CF_ERROR_LOG - 3
94#define CF_ERROR_LOG_FLUSH CF_ERROR_LOG - 4
95#define CF_ERROR_LOG_INVALID_ARGS CF_ERROR_LOG - 5
96#define CF_ERROR_LOG_CREATE_CTX CF_ERROR_LOG - 6
97#define CF_ERROR_LOG_CREATE_FILE CF_ERROR_LOG - 7
98#define CF_ERROR_LOG_ALLOCATE_BUFFER CF_ERROR_LOG - 8
99/* }}} log */
100
101/* codec {{{ */
102#define CF_ERROR_CODEC CF_ERROR_BASE * 7
103/*------------------------------------------------------------*/
104#define CF_ERROR_CODEC_INVALID_ARGS CF_ERROR_CODEC - 1
105#define CF_ERROR_CODEC_NOT_HEXSTRING CF_ERROR_CODEC - 2
106#define CF_ERROR_CODEC_NOT_BASE64 CF_ERROR_CODEC - 3
107/* }}} codec */
108
109/* data structure - list/queue/stack {{{ */
110#define CF_ERROR_DS CF_ERROR_BASE * 8
111/*------------------------------------------------------------*/
112#define CF_ERROR_DS_INVALID_CTX CF_ERROR_DS - 1
113#define CF_ERROR_DS_INVALID_TRAVERSER CF_ERROR_DS - 2
114#define CF_ERROR_DS_INVALID_ARGS CF_ERROR_DS - 3
115#define CF_ERROR_DS_CREATE_CTX CF_ERROR_DS - 4
116#define CF_ERROR_DS_CREATE_NODE CF_ERROR_DS - 5
117#define CF_ERROR_DS_NO_MORE CF_ERROR_DS - 6
118/* }}} data structure - list/queue/stack */
119
120/* bitwise {{{ */
121#define CF_ERROR_BITWISE CF_ERROR_BASE * 9
122/*------------------------------------------------------------*/
123#define CF_ERROR_BITWISE_INVALID_ARGS CF_ERROR_BITWISE - 1
124#define CF_ERROR_BITWISE_ALLOCATE_BUFFER CF_ERROR_BITWISE - 2
125/* }}} bitwise */
126
127/* util {{{ */
128#define CF_ERROR_UTIL CF_ERROR_BASE * 10
129/*------------------------------------------------------------*/
130#define CF_ERROR_UTIL_INVALID_ARGS CF_ERROR_UTIL - 1
131/* }}} util */
132
133#endif // #ifndef __CF_ERROR_H__
Note: See TracBrowser for help on using the repository browser.