ErrorCode.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. #ifndef __ERROR_CODE_H
  2. #define __ERROR_CODE_H
  3. #pragma once
  4. /** two level error,the range between (0,0x1ff) is common error,it can recover anther is system level error and can't be recover */
  5. enum ErrorCodeEnum
  6. {
  7. Error_Succeed=0,
  8. //data check's category
  9. Error_DataCheck=100, //mark the beginning for this category
  10. Error_Null, //the error of a null pointer
  11. Error_Param, //the error of a illegal parameter
  12. Error_Overflow, //The length or range overflow
  13. Error_TooSmallBuffer, // buffer too small
  14. Error_NotIntegrated, //The package or result is not intergrated
  15. Error_CheckSum, //Check sum is not the same
  16. Error_MisMatched, //the expression is mismatching
  17. //Target being's category
  18. Error_TargetBeing=0x200,
  19. Error_NoTarget, //request target is not exist
  20. Error_NoDefine, //The class or object no define
  21. Error_NotImpl, //the method has not implement yet
  22. Error_NotExist, //not exist
  23. Error_Duplication, //Duplicate action or object
  24. Error_Unregisted, //exist but the object has not registered
  25. Error_AlreadyExist, //already exist
  26. Error_MethodNotFound, //method does not exist
  27. Error_Redirect, // redirect indication
  28. Error_BridgeNotBind, // bridge bind indication
  29. Error_BridgeNotOK, // try bridge fail
  30. Error_NotSupport, // don't support the request
  31. Error_NotConfig, /** The dream configuration is unsettled*/
  32. //Entity state's category
  33. Error_InvalidState=0x300, //state is not valid for current call
  34. Error_NotInit, //The target is not be initial
  35. Error_Paused, //the access object is in Pause state
  36. Error_Stoped, //the access object is in Stop state
  37. Error_Losted, //the access object is in Lost state
  38. Error_Closed, //opposite side in close state
  39. Error_Accept, //test mode: pass the test
  40. Error_Failed, //test mode: fail to pass the test.
  41. Error_Busy, //the access object is busy doing
  42. //Framework Task control's category
  43. Error_TaskControl=0x400,
  44. Error_Pending, //The request in not finish
  45. Error_Cancel, //The process is be cancel by framework
  46. Error_Break, //The task has interrupt
  47. Error_NotMeetCondition, //not meat run condition,run cancel
  48. Error_NoPrivilege, //no privilege
  49. Error_MethodSignatureFailed, //method signature failed
  50. //opposite side action's category
  51. Error_PeerAction=0x500,
  52. Error_PeerClose, //peer close request
  53. Error_PeerIgnore, //peer did not answer before the ITransactionContext object release
  54. Error_PeerReject, //The another side reject the request
  55. Error_PeerDelay, //The task can not run right now,will be deley to set time
  56. //process fail's category
  57. Error_Process=0x600,
  58. Error_NetBroken, //the network is broken
  59. Error_UpdateFailed, //system update failed
  60. Error_RegistryFailed, //registry operation failed
  61. Error_IO, //IO error(file reading/writing)
  62. Error_Readonly, //The object can't be edit
  63. Error_TimeOut=0x700,
  64. Error_BlockTimeOut, //WaitAnswer time out
  65. Error_ThreadTimeOut, //Max Thread run time
  66. Error_QueueTimeOut, //Task wait time out in queue
  67. Error_ReplyTimeOut, //The system max answer time
  68. Error_Hardware=0x800,
  69. Error_DevLoadFileFailed, //load dll or config file failed
  70. Error_DevNotAvailable, //device not connected
  71. Error_DevAlreadyConnected, //device already connected
  72. Error_DevConnFailed, //connect to device failed
  73. Error_DevCommFailed, //Communication failed between HOST and Device
  74. Error_DevMedia, //Media error(Data lack,unrecognized and so on)
  75. Error_EnvCamera, //EnvCamera error
  76. Error_OptCamera, //OptCamera error(Data lack,unrecognized and so on)
  77. Error_AllCamera, //AllCamera error(Data lack,unrecognized and so on)
  78. Error_AudioIN,
  79. Error_AudioOut,
  80. Error_Debug=0xf00,
  81. Error_Assert,
  82. Error_Trace,
  83. Error_Bug, //bug detected
  84. Error_Unrecover=0x70000000,
  85. Error_Resource, //The system resource ec:memory/handle/space,do not retry,should restart system
  86. Error_NewProcess, //start process failed
  87. Error_FailVerify, //Signature verification failed of entity
  88. Error_Block, //The thread block and the module hold
  89. Error_Exception, //except throw
  90. Error_Unexpect=0x7ffffffe, //the fail reason is not expect
  91. Error_IgnoreAll=0x7fffffff // for special internal usage only, user dont use this code
  92. };
  93. #define ERR_(e) #e
  94. #endif // __ERROR_CODE_H