ErrorCode.h 4.1 KB

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