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

Last change on this file since 88 was 88, checked in by cheese, 11 years ago

#1 add base64 and arrange hex-decoding more fast

File size: 4.4 KB
Line 
1/**
2 * @file cf_error.h
3 * @author myusgun <myusgun@gmail.com>
4 *
5 * @remarks 오류코드 모음
6 */
7#ifndef __CF_ERROR_H__
8#define __CF_ERROR_H__
9
10#include "cf_base.h"
11
12/** 오류 코드 베이스 넘버 */
13#define CF_ERROR_BASE CF_ERROR * 1000
14
15/* file {{{ */
16#define CF_ERROR_FILE CF_ERROR_BASE * 2
17/*------------------------------------------------------------*/
18#define CF_ERROR_FILE_OPEN CF_ERROR_FILE - 1
19#define CF_ERROR_FILE_INVALID_ARGS CF_ERROR_FILE - 2
20#define CF_ERROR_FILE_READ CF_ERROR_FILE - 3
21#define CF_ERROR_FILE_WRITE CF_ERROR_FILE - 4
22#define CF_ERROR_FILE_CREATE CF_ERROR_FILE - 5
23#define CF_ERROR_FILE_CLOSE CF_ERROR_FILE - 6
24#define CF_ERROR_FILE_GET_SIZE CF_ERROR_FILE - 7
25#define CF_ERROR_FILE_MAKE_DIRECTORY CF_ERROR_FILE - 8
26
27/* }}} file */
28
29/* socket {{{ */
30#define CF_ERROR_SOCKET CF_ERROR_BASE * 3
31/*------------------------------------------------------------*/
32#define CF_ERROR_SOCKET_INITIALIZE CF_ERROR_SOCKET - 1
33#define CF_ERROR_SOCKET_NOT_INITIALIZED CF_ERROR_SOCKET - 2
34#define CF_ERROR_SOCKET_FINALIZE CF_ERROR_SOCKET - 3
35#define CF_ERROR_SOCKET_CLOSE CF_ERROR_SOCKET - 4
36#define CF_ERROR_SOCKET_CREATE CF_ERROR_SOCKET - 5
37#define CF_ERROR_SOCKET_CONNECT CF_ERROR_SOCKET - 6
38#define CF_ERROR_SOCKET_SET_OPTION CF_ERROR_SOCKET - 7
39#define CF_ERROR_SOCKET_GET_OPTION CF_ERROR_SOCKET - 8
40#define CF_ERROR_SOCKET_TIMEOUT CF_ERROR_SOCKET - 9
41#define CF_ERROR_SOCKET_INVALID_ARGS CF_ERROR_SOCKET - 10
42#define CF_ERROR_SOCKET_INVALID_SOCKET CF_ERROR_SOCKET - 11
43#define CF_ERROR_SOCKET_GET_HOST CF_ERROR_SOCKET - 12
44#define CF_ERROR_SOCKET_BIND CF_ERROR_SOCKET - 13
45#define CF_ERROR_SOCKET_LISTEN CF_ERROR_SOCKET - 14
46#define CF_ERROR_SOCKET_ACCEPT CF_ERROR_SOCKET - 15
47#define CF_ERROR_SOCKET_SEND CF_ERROR_SOCKET - 16
48#define CF_ERROR_SOCKET_RECV CF_ERROR_SOCKET - 17
49#define CF_ERROR_SOCKET_INTERNAL CF_ERROR_SOCKET - 18
50/* }}} socket */
51
52/* thread {{{ */
53#define CF_ERROR_THREAD CF_ERROR_BASE * 4
54/*------------------------------------------------------------*/
55#define CF_ERROR_THREAD_ALLOC CF_ERROR_THREAD - 1
56#define CF_ERROR_THREAD_CREATE CF_ERROR_THREAD - 2
57#define CF_ERROR_THREAD_INVALID_ARGS CF_ERROR_THREAD - 3
58#define CF_ERROR_THREAD_INIT_ATTR CF_ERROR_THREAD - 4
59#define CF_ERROR_THREAD_SET_INHERIT_SCHED CF_ERROR_THREAD - 5
60#define CF_ERROR_THREAD_SET_SCHED_POLICY CF_ERROR_THREAD - 6
61#define CF_ERROR_THREAD_SET_SCHED_PARAM CF_ERROR_THREAD - 7
62/* }}} thread */
63
64/* mutex {{{ */
65#define CF_ERROR_MUTEX CF_ERROR_BASE * 5
66/*------------------------------------------------------------*/
67#define CF_ERROR_MUTEX_CREATE CF_ERROR_MUTEX - 1
68#define CF_ERROR_MUTEX_INVALID_ARGS CF_ERROR_MUTEX - 2
69/* }}} mutex */
70
71/* debug {{{ */
72#define CF_ERROR_DEBUG CF_ERROR_BASE * 6
73/*------------------------------------------------------------*/
74#define CF_ERROR_DEBUG_INVALID_CTX CF_ERROR_DEBUG - 1
75#define CF_ERROR_DEBUG_PUSH_CALLSTACK CF_ERROR_DEBUG - 2
76#define CF_ERROR_DEBUG_POP_CALLSTACK CF_ERROR_DEBUG - 3
77#define CF_ERROR_DEBUG_PEEK_CALLSTACK CF_ERROR_DEBUG - 4
78#define CF_ERROR_DEBUG_ALLOCATE_CTX CF_ERROR_DEBUG - 5
79/* }}} debug */
80
81/* log {{{ */
82#define CF_ERROR_LOG CF_ERROR_BASE * 7
83/*------------------------------------------------------------*/
84#define CF_ERROR_LOG_INITIALIZE CF_ERROR_LOG - 1
85#define CF_ERROR_LOG_INVALID_CTX CF_ERROR_LOG - 2
86#define CF_ERROR_LOG_SET_MULTITHREAD CF_ERROR_LOG - 3
87#define CF_ERROR_LOG_UNSET_MULTITHREAD CF_ERROR_LOG - 4
88#define CF_ERROR_LOG_LOCK_CTX CF_ERROR_LOG - 5
89#define CF_ERROR_LOG_UNLOCK_CTX CF_ERROR_LOG - 6
90#define CF_ERROR_LOG_FLUSH CF_ERROR_LOG - 7
91#define CF_ERROR_LOG_INVALID_MAPID CF_ERROR_LOG - 8
92#define CF_ERROR_LOG_NOT_MAPPED_ID CF_ERROR_LOG - 9
93#define CF_ERROR_LOG_ALREADY_MAPPED_ID CF_ERROR_LOG - 10
94#define CF_ERROR_LOG_NOT_INITIALIZE CF_ERROR_LOG - 11
95#define CF_ERROR_LOG_INVALID_ARGS CF_ERROR_LOG - 12
96#define CF_ERROR_LOG_ALLOCATE_CTX CF_ERROR_LOG - 13
97#define CF_ERROR_LOG_CREATE_FILE CF_ERROR_LOG - 14
98#define CF_ERROR_LOG_ALLOCATE_BUFFER CF_ERROR_LOG - 15
99/* }}} log */
100
101/* codec {{{ */
102#define CF_ERROR_CODEC CF_ERROR_BASE * 8
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
110#endif // #ifndef __CF_ERROR_H__
Note: See TracBrowser for help on using the repository browser.