fx_error.h
Go to the documentation of this file.
1 
20 #ifndef _FX_ERROR_H_
21 #define _FX_ERROR_H_
22 
23 // Basic error code specification.
24 // Define three segment code.(error code, module id, error type)
25 // error code occupy 16 bits.
26 // module id occupy 8 bits.
27 // error type occupy 8 bits.
28 
29 // We define a basic module id order.
30 // NOTE: If you want register the module id, please update this file.
31 // fxcrt ------ 1
32 // fxge ------ 2
33 // fxcodec ------ 3
34 // fdrm ------ 4
35 // fpdfapi ------ 5
36 // fxtext ------ 6
37 // fpdfdoc ------ 7
38 #define FX_CRT_ID 1
39 #define FX_GE_ID 2
40 #define FX_CODEC_ID 3
41 #define FX_DRM_ID 4
42 #define FX_PDFAPI_ID 5
43 #define FX_TEXT_ID 6
44 #define FX_DOC_ID 7
45 
46 // Error type
47 #define FX_ERR_TYPE_SUCCESS 0
48 #define FX_ERR_TYPE_MEMORY 1
49 
50 // Error code
51 #define FX_ERR_CODE_OVERFLOW 0
52 #define FX_ERR_CODE_ALLOC_FAILE 1
53 
54 #define FX_MAKEERROR(moduleid, errtype, errcode) ((((errcode) << 16) & 0xFFFF0000) | \
55  (((moduleid) << 8) & 0x0000FF00) | ((errtype) & 0x000000FF))
56 
57 #endif //_FX_ERROR_H_
58 

Foxit Software Corporation Logo
@2019 Foxit Software Incorporated. All rights reserved.