123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145 |
- #ifndef __ERROR_CODE_H
- #define __ERROR_CODE_H
- #pragma once
- /** two level error,the range between (0,0x1ff) is common error,it can recover anther is system level error and can't be recover */
- enum ErrorCodeEnum
- {
- Error_Succeed=0,
-
- //data check's category
- Error_DataCheck=100, //mark the beginning for this category
- Error_Null, //the error of a null pointer
- Error_Param, //the error of a illegal parameter
- Error_Overflow, //The length or range overflow
- Error_TooSmallBuffer, // buffer too small
- Error_NotIntegrated, //The package or result is not intergrated
- Error_CheckSum, //Check sum is not the same
- Error_MisMatched, //the expression is mismatching
- Error_Deprecated, //the function is deprecated
- //Target being's category(512)
- Error_TargetBeing=0x200,
- Error_NoTarget, //request target is not exist
- Error_NoDefine, //The class or object no define
- Error_NotImpl, //the method has not implement yet
- Error_NotExist, //not exist
- Error_Duplication, //Duplicate action or object
- Error_Unregisted, //exist but the object has not registered
- Error_AlreadyExist, //already exist
- Error_MethodNotFound, //method does not exist
- Error_Redirect, // redirect indication
- Error_BridgeNotBind, // bridge bind indication
- Error_BridgeNotOK, // try bridge fail
- Error_NotSupport, // don't support the request
- Error_NotConfig, /** The dream configuration is unsettled*/
- //Entity state's category
- Error_InvalidState=0x300, //state is not valid for current call
- Error_NotInit, //The target is not be initial
- Error_Paused, //the access object is in Pause state
- Error_Stoped, //the access object is in Stop state
- Error_Losted, //the access object is in Lost state
- Error_Closed, //opposite side in close state
- Error_Accept, //test mode: pass the test
- Error_Failed, //test mode: fail to pass the test.
- Error_Busy, //the access object is busy doing
- //Framework Task control's category
- Error_TaskControl=0x400,
- Error_Pending, //The request in not finish
- Error_Cancel, //The process is be cancel by framework
- Error_Break, //The task has interrupt
- Error_NotMeetCondition, //not meat run condition,run cancel
- Error_NoPrivilege, //no privilege
- Error_MethodSignatureFailed, //method signature failed
- //opposite side action's category
- Error_PeerAction=0x500,
- Error_PeerClose, //peer close request
- Error_PeerIgnore, //peer did not answer before the ITransactionContext object release
- Error_PeerReject, //The another side reject the request
- Error_PeerDelay, //The task can not run right now,will be deley to set time
- //process fail's category
- Error_Process=0x600,
- Error_NetBroken, //the network is broken
- Error_UpdateFailed, //system update failed
- Error_RegistryFailed, //registry operation failed
- Error_IO, //IO error(file reading/writing)
- Error_Readonly, //The object can't be edit
- Error_TimeOut=0x700,
- Error_BlockTimeOut, //WaitAnswer time out
- Error_ThreadTimeOut, //Max Thread run time
- Error_QueueTimeOut, //Task wait time out in queue
- Error_ReplyTimeOut, //The system max answer time
- Error_Hardware=0x800,
- Error_DevLoadFileFailed, //load dll or config file failed
- Error_DevNotAvailable, //device not connected
- Error_DevAlreadyConnected, //device already connected
- Error_DevConnFailed, //connect to device failed
- Error_DevCommFailed, //Communication failed between HOST and Device
- Error_DevMedia, //Media error(Data lack,unrecognized and so on)
- Error_EnvCamera, //EnvCamera error
- Error_OptCamera, //OptCamera error(Data lack,unrecognized and so on)
- Error_AllCamera, //AllCamera error(Data lack,unrecognized and so on)
- Error_EwsCamera, //EwsCamera error(Data lack,unrecognized and so on)
- Error_AudioIN,
- Error_AudioOut,
- Error_DevFailAddUp, //Number of errors reach to the limit
- Error_Interact,
- Error_Dev_HookNotAtPos, //钩子未归位
- Error_Dev_Offline, //设备掉线
- Error_Dev_CmdUnableExecute, //命令不可执行
-
- Error_Dev_HopperHasNoCard, //卡箱无卡
- Error_Dev_HopperMissing, //发卡箱缺失
- Error_Dev_TransCarJammed, //传输小车堵塞
- Error_Dev_RetainBinFull, //回收箱满
- Error_Dev_RetainBinMissing, //回收箱缺失
- Error_Dev_CardInReader, //读卡器内有卡
- Error_Dev_SlotHasNoCard, //卡槽内无卡
- Error_Dev_CardInSlot, //卡槽内有卡
- Error_Dev_NoCardInReader, //读卡器内无卡
- Error_Dev_CardJammed, //塞卡
- Error_Dev_SlotJammed, //卡槽堵塞
- Error_Dev_SlotInvalid, //卡槽地址非法(越界等)
- Error_Dev_IDCardNotFound, // 未检测到身份证
- Error_MaintainRequired, //Device breakdown and in need of repair.
- //Socket Type Error
- Error_Socket = 0x900,
- Error_ConnectFailed,
- Error_ServerNotAvailable,
-
- Error_Debug=0xf00,
- Error_Assert,
- Error_Trace,
- Error_Bug, //bug detected
-
- /*
- // device error code x define at range 0x00010000 <= x <= 0x0001ffff
- //
- Error_Device_Begin = 0x00010000,
- //...... device error codes goes here
- Error_Device_End = 0x0001ffff,
- */
- Error_Unrecover=0x70000000, //less than this means can recovery, while great than this means fatal and need reboot
- Error_Resource, //The system resource ec:memory/handle/space,do not retry,should restart system
- Error_NewProcess, //start process failed
- Error_FailVerify, //Signature verification failed of entity
- Error_Block, //The thread block and the module hold
- Error_Exception, //except throw
- Error_Unexpect=0x7ffffffe, //the fail reason is not expect
- Error_IgnoreAll=0x7fffffff // for special internal usage only, user dont use this code
- };
- #define ERR_(e) #e
- #endif // __ERROR_CODE_H
|