|
@@ -3,91 +3,64 @@
|
|
|
*/
|
|
|
|
|
|
var ErrorCodeEnum = {
|
|
|
- Error_Succeed: 0,
|
|
|
+ Error_Succeed : 0,
|
|
|
//date check category
|
|
|
- Error_DataCheck: 100, //mark the beginning for this category
|
|
|
- Error_Null: 101, //the error of a null pointer
|
|
|
- Error_Param: 102, //the error of a illegal parameter
|
|
|
- Error_Overflow: 103, //The length or range overflow
|
|
|
- Error_TooSmallBuffer: 104, // buffer too small
|
|
|
- Error_NotIntegrated: 105, //The package or result is not intergrated
|
|
|
- Error_CheckSum: 106, //Check sum is not the same
|
|
|
- Error_MisMatched: 107, //the expression is mismatching
|
|
|
- Error_Deprecated: 108, //the function is deprecated
|
|
|
+ Error_DataCheck : 100, //mark the beginning for this category
|
|
|
+ Error_Null : 101, //the error of a null pointer
|
|
|
+ Error_Param : 102, //the error of a illegal parameter
|
|
|
+ Error_Overflow : 103, //The length or range overflow
|
|
|
+ Error_TooSmallBuffer : 104, // buffer too small
|
|
|
+ Error_NotIntegrated : 105, //The package or result is not intergrated
|
|
|
//Target being category
|
|
|
- Error_TargetBeing: 0x200,
|
|
|
- Error_NoTarget: 0x201, //request target is not exist
|
|
|
- Error_NoDefine: 0x202, //The class or object no define
|
|
|
- Error_NotImpl: 0x203, //the method has not implement yet
|
|
|
- Error_NotExist: 0x204, //not exist
|
|
|
- Error_Duplication: 0x205, //Duplicate action or object
|
|
|
- Error_Unregisted: 0x206, //exist but the object has not regist
|
|
|
- Error_AlreadyExist: 0x207, //already exist
|
|
|
- Error_MethodNotFound: 0x208, //method does not exist
|
|
|
- Error_Redirect: 0x209, // redirect indication
|
|
|
- Error_BridgeNotBind: 0x20A, // bridge bind indication
|
|
|
- Error_BridgeNotOK: 0x20B, // try bridge fail
|
|
|
- Error_NotSupport: 0x20C, // don't support the request
|
|
|
- Error_NotConfig: 0x20D, /** The dream configuration is unsettled*/
|
|
|
+ Error_TargetBeing : 0x200,
|
|
|
+ Error_NoTarget : 0x201, //request target is not exist
|
|
|
+ Error_NoDefine : 0x202, //The class or object no define
|
|
|
+ Error_NotImpl : 0x203, //the method has not implement yet
|
|
|
+ Error_NotExist : 0x204, //not exist
|
|
|
+ Error_Duplication : 0x205, //Duplicate action or object
|
|
|
+ Error_Unregisted : 0x206, //exist but the object has not regist
|
|
|
+ Error_AlreadyExist : 0x207, //already exist
|
|
|
+ Error_MethodNotFound : 0x208, //method does not exist
|
|
|
+ Error_Redirect : 0x209, // redirect indication
|
|
|
//Entity state category
|
|
|
- Error_InvalidState: 0x300, //state is not valid for current call
|
|
|
- Error_NotInit: 0x301, //The target is not be initial
|
|
|
- Error_Paused: 0x302, //the access object is in Pause state
|
|
|
- Error_Stoped: 0x303, //the access object is in Stop state
|
|
|
- Error_Losted: 0x304, //the access object is in Lost state
|
|
|
- Error_Closed: 0x305, //opposite side in close state
|
|
|
- Error_Accept: 0x306, //test mode: pass the test
|
|
|
- Error_Failed: 0x307, //test mode: fail to pass the test.
|
|
|
- Error_Busy: 0x308, //the access object is busy doing
|
|
|
+ Error_InvalidState : 0x300, //state is not valid for current call
|
|
|
+ Error_NotInit : 0x301, //The target is not be initial
|
|
|
+ Error_Paused : 0x302, //the access object is in Pause state
|
|
|
+ Error_Stoped : 0x303, //the access object is in Stop state
|
|
|
+ Error_Losted : 0x304, //the access object is in Lost state
|
|
|
+ Error_Closed : 0x305, //opposite side in close state
|
|
|
//Framework Task control category
|
|
|
- Error_TaskControl: 0x400,
|
|
|
- Error_Pending: 0x401, //The request in not finish
|
|
|
- Error_Cancel: 0x402, //The process is be cancel by framework
|
|
|
- Error_Break: 0x403, //The task has interrupt
|
|
|
- Error_NotMeetCondition: 0x404, //not meat run condition,run cancel
|
|
|
- Error_NoPrivilege: 0x405, //no privilege
|
|
|
- Error_MethodSignatureFailed: 0x406,//method signature failed
|
|
|
+ Error_TaskControl : 0x400,
|
|
|
+ Error_Pending : 0x401, //The request in not finish
|
|
|
+ Error_Cancel : 0x402, //The process is be cancel by framework
|
|
|
+ Error_Break : 0x403, //The task has interrupt
|
|
|
+ Error_NotMeetCondition : 0x404, //not meat run condition,run cancel
|
|
|
+ Error_NoPrivilege : 0x405, //no privilege
|
|
|
+ Error_MethodSignatureFailed : 0x406,//method signature failed
|
|
|
//opposite side action category
|
|
|
- Error_PeerAction: 0x500,
|
|
|
- Error_PeerClose: 0x501, //peer close request
|
|
|
- Error_PeerIgnore: 0x502, //peer did not anwer before the ITransactionContext object release
|
|
|
- Error_PeerReject: 0x503, //The another side reject the request
|
|
|
- Error_PeerDelay: 0x504, //The tast can not run right now,will be deley to set time
|
|
|
+ Error_PeerAction : 0x500,
|
|
|
+ Error_PeerClose : 0x501, //peer close request
|
|
|
+ Error_PeerIgnore : 0x502, //peer did not anwer before the ITransactionContext object release
|
|
|
+ Error_PeerReject : 0x503, //The another side reject the request
|
|
|
+ Error_PeerDelay : 0x504, //The tast can not run right now,will be deley to set time
|
|
|
//process fail category
|
|
|
- Error_Process: 0x600,
|
|
|
- Error_NetBroken: 0x601, //the network is broken
|
|
|
- Error_UpdateFailed: 0x602, //system update failed
|
|
|
- Error_RegistryFailed: 0x603, //registry operation failed
|
|
|
- Error_IO: 0x604, //IO error(file reading/writing)
|
|
|
- Error_Readonly: 0x605, //The object can't be edit
|
|
|
+ Error_Process : 0x600,
|
|
|
+ Error_NetBroken : 0x601, //the network is broken
|
|
|
+ Error_UpdateFailed : 0x602, //system update failed
|
|
|
+ Error_RegistryFailed : 0x603, //registry operation failed
|
|
|
+ Error_IO : 0x604, //IO error(file reading/writing)
|
|
|
+ Error_Readonly : 0x605, //The object can't be edit
|
|
|
// ...
|
|
|
- Error_TimeOut: 0x700,
|
|
|
- Error_BlockTimeOut: 0x701, //WaitAnswer time out
|
|
|
+ Error_TimeOut : 0x700,
|
|
|
+ Error_BlockTimeOut : 0x701, //WaitAnswer time out
|
|
|
Error_ThreadTimeOut: 0x702, //Max Thread run time
|
|
|
- Error_QueueTimeOut: 0x703, //Tast wait time out in queue
|
|
|
- Error_ReplyTimeOut: 0x704, //The system max answer time
|
|
|
- Error_Hardware: 0x800,
|
|
|
- Error_DevLoadFileFailed: 0x801, //load dll or config file failed
|
|
|
- Error_DevNotAvailable: 0x802, //device not connected
|
|
|
- Error_DevAlreadyConnected: 0x803, //device already connected
|
|
|
- Error_DevConnFailed: 0x804, //connect to device failed
|
|
|
- Error_DevCommFailed: 0x805, //Communication failed between HOST and Device
|
|
|
- Error_DevMedia: 0x806, //Media error(Data lack,unrecognized and so on)
|
|
|
- Error_EnvCamera: 0x807, //EnvCamera error
|
|
|
- Error_OptCamera: 0x808, //OptCamera error(Data lack,unrecognized and so on)
|
|
|
- Error_AllCamera: 0x809, //AllCamera error(Data lack,unrecognized and so on)
|
|
|
- Error_EwsCamera: 0x80A, //EwsCamera error(Data lack,unrecognized and so on)
|
|
|
- Error_AudioIN: 0x80B,
|
|
|
- Error_AudioOut: 0x80C,
|
|
|
- //Socket Type Error
|
|
|
- Error_Socket: 0x900,
|
|
|
- Error_ConnectFailed: 0x901,
|
|
|
- Error_ServerNotAvailable: 0x902,
|
|
|
+ Error_QueueTimeOut : 0x703, //Tast wait time out in queue
|
|
|
+ Error_ReplyTimeOut : 0x704, //The system max answer time
|
|
|
// ...
|
|
|
- Error_Debug: 0xf00,
|
|
|
+ Error_Debug : 0xf00,
|
|
|
Error_Assert: 0xf01,
|
|
|
- Error_Trace: 0xf02,
|
|
|
- Error_Bug: 0xf03, //bug detected
|
|
|
+ Error_Trace : 0xf02,
|
|
|
+ Error_Bug : 0xf03, //bug detected
|
|
|
/*
|
|
|
// device error code x define at range 0x00010000 <= x <= 0x0001ffff
|
|
|
//
|
|
@@ -95,273 +68,12 @@ var ErrorCodeEnum = {
|
|
|
//...... device error codes goes here
|
|
|
Error_Device_End = 0x0001ffff,
|
|
|
*/
|
|
|
- Error_Unrecover: 0x70000000,
|
|
|
- Error_Resource: 0x70000001, //The system resource ec:memory/handle/space,do not retry,should restart system
|
|
|
+ Error_Unrecover : 0x70000000,
|
|
|
+ Error_Resource : 0x70000001, //The system resource ec:memory/handle/space,do not retry,should restart system
|
|
|
Error_NewProcess: 0x70000002, //start process failed
|
|
|
Error_FailVerify: 0x70000003, //Signature verification failed of entity
|
|
|
- Error_Block: 0x70000004, //The thread block and the module hold
|
|
|
- Error_Exception: 0x70000005, //except throw
|
|
|
- Error_Unexpect: 0x7ffffffe, //the fail reason is not expect
|
|
|
- Error_IgnoreAll: 0x7fffffff, // for special internal usage only, user dont use this code
|
|
|
-};
|
|
|
-
|
|
|
-function ErrorCodeStringfy(val)
|
|
|
-{
|
|
|
- var output;
|
|
|
- if(typeof val === 'string') {
|
|
|
- var tmp = parseInt(val, 10);
|
|
|
- } else {
|
|
|
- var tmp = val;
|
|
|
- }
|
|
|
-
|
|
|
- switch(tmp) {
|
|
|
- case ErrorCodeEnum.Error_Succeed:
|
|
|
- output = 'Error_Succeed';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_DataCheck:
|
|
|
- output = 'Error_DataCheck';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_Null:
|
|
|
- output = 'Error_Null';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_Param:
|
|
|
- output = 'Error_Param';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_Overflow:
|
|
|
- output = 'Error_Overflow';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_TooSmallBuffer:
|
|
|
- output = 'Error_TooSmallBuffer';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_NotIntegrated:
|
|
|
- output = 'Error_NotIntegrated';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_CheckSum:
|
|
|
- output = 'Error_CheckSum';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_MisMatched:
|
|
|
- output = 'Error_MisMatched';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_TargetBeing:
|
|
|
- output = 'Error_TargetBeing';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_NoTarget:
|
|
|
- output = 'Error_NoTarget';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_NoDefine:
|
|
|
- output = 'Error_NoDefine';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_NotImpl:
|
|
|
- output = 'Error_NotImpl';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_NotExist:
|
|
|
- output = 'Error_NotExist';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_Duplication:
|
|
|
- output = 'Error_Duplication';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_Unregisted:
|
|
|
- output = 'Error_Unregisted';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_AlreadyExist:
|
|
|
- output = 'Error_AlreadyExist';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_MethodNotFound:
|
|
|
- output = 'Error_MethodNotFound';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_Redirect:
|
|
|
- output = 'Error_Redirect';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_BridgeNotBind:
|
|
|
- output = 'Error_BridgeNotBind';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_BridgeNotOK:
|
|
|
- output = 'Error_BridgeNotOK';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_NotSupport:
|
|
|
- output = 'Error_NotSupport';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_NotConfig:
|
|
|
- output = 'Error_NotConfig';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_InvalidState:
|
|
|
- output = 'Error_InvalidState';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_NotInit:
|
|
|
- output = 'Error_NotInit';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_Paused:
|
|
|
- output = 'Error_Paused';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_Stoped:
|
|
|
- output = 'Error_Stoped';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_Losted:
|
|
|
- output = 'Error_Losted';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_Closed:
|
|
|
- output = 'Error_Closed';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_Accept:
|
|
|
- output = 'Error_Accept';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_Failed:
|
|
|
- output = 'Error_Failed';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_Busy:
|
|
|
- output = 'Error_Busy';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_TaskControl:
|
|
|
- output = 'Error_TaskControl';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_Pending:
|
|
|
- output = 'Error_Pending';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_Cancel:
|
|
|
- output = 'Error_Cancel';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_Break:
|
|
|
- output = 'Error_Break';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_NotMeetCondition:
|
|
|
- output = 'Error_NotMeetCondition';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_NoPrivilege:
|
|
|
- output = 'Error_NoPrivilege';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_MethodSignatureFailed:
|
|
|
- output = 'Error_MethodSignatureFailed';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_PeerAction:
|
|
|
- output = 'Error_PeerAction';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_PeerClose:
|
|
|
- output = 'Error_PeerClose';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_PeerIgnore:
|
|
|
- output = 'Error_PeerIgnore';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_PeerReject:
|
|
|
- output = 'Error_PeerReject';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_PeerDelay:
|
|
|
- output = 'Error_PeerDelay';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_Process:
|
|
|
- output = 'Error_Process';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_NetBroken:
|
|
|
- output = 'Error_NetBroken';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_UpdateFailed:
|
|
|
- output = 'Error_UpdateFailed';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_RegistryFailed:
|
|
|
- output = 'Error_RegistryFailed';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_IO:
|
|
|
- output = 'Error_IO';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_Readonly:
|
|
|
- output = 'Error_Readonly';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_TimeOut:
|
|
|
- output = 'Error_TimeOut';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_BlockTimeOut:
|
|
|
- output = 'Error_BlockTimeOut';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_ThreadTimeOut:
|
|
|
- output = 'Error_ThreadTimeOut';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_QueueTimeOut:
|
|
|
- output = 'Error_QueueTimeOut';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_ReplyTimeOut:
|
|
|
- output = 'Error_ReplyTimeOut';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_Hardware:
|
|
|
- output = 'Error_Hardware';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_DevLoadFileFailed:
|
|
|
- output = 'Error_DevLoadFileFailed';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_DevNotAvailable:
|
|
|
- output = 'Error_DevNotAvailable';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_DevAlreadyConnected:
|
|
|
- output = 'Error_DevAlreadyConnected';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_DevConnFailed:
|
|
|
- output = 'Error_DevConnFailed';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_DevCommFailed:
|
|
|
- output = 'Error_DevCommFailed';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_DevMedia:
|
|
|
- output = 'Error_DevMedia';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_EnvCamera:
|
|
|
- output = 'Error_EnvCamera';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_OptCamera:
|
|
|
- output = 'Error_OptCamera';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_AllCamera:
|
|
|
- output = 'Error_AllCamera';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_EwsCamera:
|
|
|
- output = 'Error_EwsCamera';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_AudioIN:
|
|
|
- output = 'Error_AudioIN';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_AudioOut:
|
|
|
- output = 'Error_AudioOut';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_Socket:
|
|
|
- output = 'Error_Socket';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_ConnectFailed:
|
|
|
- output = 'Error_ConnectFailed';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_ServerNotAvailable:
|
|
|
- output = 'Error_ServerNotAvailable';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_Debug:
|
|
|
- output = 'Error_Debug';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_Assert:
|
|
|
- output = 'Error_Assert';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_Trace:
|
|
|
- output = 'Error_Trace';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_Bug:
|
|
|
- output = 'Error_Bug';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_Unrecover:
|
|
|
- output = 'Error_NewProcess';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_FailVerify:
|
|
|
- output = 'Error_FailVerify';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_Block:
|
|
|
- output = 'Error_Block';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_Exception:
|
|
|
- output = 'Error_Exception';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_Unexpect:
|
|
|
- output = 'Error_Unexpect';
|
|
|
- break;
|
|
|
- case ErrorCodeEnum.Error_IgnoreAll:
|
|
|
- output = 'Error_IgnoreAll';
|
|
|
- break;
|
|
|
- default:
|
|
|
- output = 'Unkonwn: ' + val;
|
|
|
- break;
|
|
|
- }
|
|
|
- return output;
|
|
|
-
|
|
|
-}
|
|
|
+ Error_Block : 0x70000004, //The thread block and the module hold
|
|
|
+ Error_Exception : 0x70000005, //except throw
|
|
|
+ Error_Unexpect : 0x7ffffffe, //the fail reason is not expect
|
|
|
+ Error_IgnoreAll : 0x7fffffff, // for special internal usage only, user dont use this code
|
|
|
+};
|