Example #1
0
#coding=gbk
"""
Copyright (C), 2012-2015, Anything Connected Possibilities
Author: ACP2013
Version: 1.0
Date: 2012-09
Description:
Others:      
Key Class&Method List: 
             1. ....
History: 
1. Date:
   Author:
   Modification:
"""

import err_code_mgr
from _mit import mit_error
err_code_mgr.regist_errors(mit_error.error_defs)
Example #2
0
#coding=gbk
"""
Copyright (C), 2012-2015, Anything Connected Possibilities
Author: ACP2013
Version: 1.0
Date: 2012-09-12
Description: 
Others:      
Key Class&Method List: 
             1. ....
History: 
1. Date:
   Author:
   Modification:
"""

import sys
sys.path.append(__path__[0] + '/transport')

import err_code_mgr
from _bundleframework import local_error_code
err_code_mgr.regist_errors(local_error_code.error_defs)

Example #3
0
                                             , "the AppType %(app_type)s does not exist")
                            , "ER_PID_NOT_EXIST_EXCEPTION" : (MONITOR_ERROR_BASE + 2
                                            , "Pid %(pid)s 不存在"
                                            , "the Pid %(pid)s does not exist")
                            ,"ER_INSTANCE_NAME_NOT_EXIST_EXCEPTION": (MONITOR_ERROR_BASE+3
                                            ,"实例名称  %(instance_name)s 不存在"
                                            ,"the Instance Name %(instance_name)s does not exist")             
                           ,"ER_ENDPOINT_NOT_EXIST_EXCEPTION": (MONITOR_ERROR_BASE+4
                                            ,"endpoint %(endpoint)s 不存在"
                                            ,"the endpoint %(endpoint)s does not exist")
                           ,"ER_UNREGISTER_PARAMETER_NOT_EXIST_EXCEPTION": (MONITOR_ERROR_BASE+5
                                            ,"unregister 参数 不存在"
                                            ,"unregister parameter does not exist")                           
                           ,"ER_INVALID_DESERIALIZE_STRING_ERROR": (MONITOR_ERROR_BASE+6
                                            ,"从命令   %(cmd)s 的参数  %(param_name)s 为非法的反序列化字符串"
                                            ,"invalid string to deserialize from command %(cmd)s parameter  %(param_name)s")
                           ,"ER_ENDPOINT_EXIST_EXCEPTION": (MONITOR_ERROR_BASE+7
                                            ,"Endpoint   %(endpoint)s 已经存在"
                                            ,"Endpoint   %(endpoint)s exists")
                           ,"ER_NAME_SERVER_IS_NOT_MASTER": (MONITOR_ERROR_BASE+8
                                            , "当前名字服务不是master, 真正的master为%(ip)s"
                                            , "the current name service is not master. The real master is %(ip)s")
                                            
                           ,"ER_CLUSTER_IS_DISABLE": (MONITOR_ERROR_BASE+9
                                            , "集群功能被禁用"
                                            , "the cluster is disabled")
                                            
                            
             }
err_code_mgr.regist_errors(name_service_error_defs)
Example #4
0
Copyright (C), 2012-2015, Anything Connected Possibilities
Author: ACP2013
Version: 1.0
Date: 
Description: 
Others:      
Key Class&Method List: 
             1. 本文件中定义了cluster的错误码
History: 
1. Date:
   Author:
   Modification:
"""

import err_code_mgr

# cluster错误码: 3601~3700

error_defs = {

  # 集群错误码
    "ER_CLUSTER_START_FAILED":  (3601, "启动分布式集群节点失败", "Start the cluster node failed")
  , "ER_CLUSTER_LOAD_CFG_FAILED":  (3602, "加载集群配置文件失败", "Load cluster configuration failed")                                            
  , "ER_CLUSTER_IS_DISABLED":  (3603, "当前集群节点被禁用", "The current cluster node is disabled")
  , "ER_CANNOT_RMV_ONLINE_CLUSTER_NODE": (3604, "不能删除在线的集群节点", "Can not remove online cluster node")
  , "ER_CLUSTER_REACH_MAX": (3605, "当前集群的节点已经达到了最大数目", "The number of cluster nodes has reached the maximum")
             }
             
err_code_mgr.regist_errors(error_defs)

Example #5
0
                            , "ER_NO_NUM_PER_PAGE_PARAMETER" : (EVENT_MANAGER_ERROR_BASE + 5
                                            , "没有 num_per_page 参数"
                                            , "num_per_page parameter does not exist")      
                            , "ER_NUM_PER_PAGE_OUT_OF_SCOPE" : (EVENT_MANAGER_ERROR_BASE + 6
                                            , "num_per_page %(value)s 超出范围"
                                            , "num_per_page %(value)s out of scope")
                            , "ER_NO_EVENT_FILTER_PARAMETER" : (EVENT_MANAGER_ERROR_BASE + 7
                                            , "没有 event_filter 参数"
                                            , "event_filter parameter does not exist")           
                            , "ER_NEGATIVE_START_TIME" : (EVENT_MANAGER_ERROR_BASE + 8
                                            , "start_time %(start_time)s 是负数"
                                            , "start_time %(start_time)s is negative")
                            , "ER_NEGATIVE_END_TIME" : (EVENT_MANAGER_ERROR_BASE + 9
                                            , "end_time %(end_time)s 是负数"
                                            , "end_time %(end_time)s is negative")
                            , "ER_END_LESS_START" : (EVENT_MANAGER_ERROR_BASE + 10
                                            , "end_time %(end_time)s 小于  start_time %(start_time)s"
                                            , "end_time %(end_time)s is less than start_time %(start_time)s")
                            , "ER_EAU_NOT_REGISTER" : (EVENT_MANAGER_ERROR_BASE + 11
                                            , "EAU %(eau_ip)s 的pid不存在"
                                            , "the pid of EAU %(eau_ip)s does not exist")
                            , "ER_EAU_GATE_NOT_ACTIVE" : (EVENT_MANAGER_ERROR_BASE + 12
                                            , "EAUGate 没有运行"
                                            , "EAUGate is not active")
                            , "ER_QUERY_FROM_EAU_TIMEOUT" : (EVENT_MANAGER_ERROR_BASE + 13
                                            , "从 EAU %(eau_ip)s 获取事件超时"
                                            , "query event timeout from EAU %(eau_ip)s")
                
             }
err_code_mgr.regist_errors(event_manager_error_defs)
Example #6
0
History: 
1. Date:
   Author:
   Modification:
"""


import err_code_mgr

REINFOECE_ERROR_BASE = 3301

maintainlog_error_defs = {  
                     "ER_REINFOECE_TELNET_ERROR" : (REINFOECE_ERROR_BASE + 1
                                            , "telnet服务已经打开"
                                            ,"telnet service is running")
                   , "ER_USER_ERROR" : (REINFOECE_ERROR_BASE + 2
                                            , "存在不必要的用户"
                                            ,"Some Users is unnecessary") 
                    , "ER_CMD_ERROR" : (REINFOECE_ERROR_BASE + 3
                                            , "控制台命令执行发送错误"
                                            ,"CMD Execute Failed")    
                    , "ER_USER_CYCLE_ERROR" : (REINFOECE_ERROR_BASE + 4
                                            , "账户口令周期存在风险"
                                            ,"Risk exists in the User Cylce validity ")
                    , "ER_IO_ERROR" : (REINFOECE_ERROR_BASE + 5
                                            , "读取文件发送错误"
                                            ,"Read File Failed")
             }

err_code_mgr.regist_errors(maintainlog_error_defs)
Example #7
0
Date: 2013-01-08
Description: ftp_server_app的错误码
Others: 无
Key Class&Method List: 无
History: 
1. Date:2013-01-08
   Author:ACP2013
   Modification:新建文件
"""


import err_code_mgr

FTPSERVER_ERROR_BASE = 3101

ftp_server_error_defs = {"ER_FTPSERVER_SET_WRONG" : (FTPSERVER_ERROR_BASE + 1
                                             , "设置ftp服务发生错误 : %(errinfo)s"
                                             , "Fail to set ftp server: %(errinfo)s" )  
                         ,"ER_FTPSERVER_INVALID_DESERIALIZE_ERROR" : (FTPSERVER_ERROR_BASE + 2
                                             , "ftp_server得到非法的反序列化字符串"
                                             , "invalid string to deserialize" )
                         ,"ER_FTPSERVER_USER_NOT_EXISTS_ERROR" : (FTPSERVER_ERROR_BASE + 3
                                             , "不存在该FTP用户"
                                             , "Ftp User not exists" )  
                         ,"ER_FTPSERVER_DB_ERROR" : (FTPSERVER_ERROR_BASE + 4
                                             , "修改密码失败"
                                             , "Fail to change ftp password" ) 
             }

err_code_mgr.regist_errors(ftp_server_error_defs)
Example #8
0
"""

import err_code_mgr

#OSS 命令码
DB_SYNC_ERROR_BASE = 3700

db_sync_error_defs = {"ER_SYNC_FAILED" : (DB_SYNC_ERROR_BASE + 1
                                        , "执行数据同步异常。 异常信息 : %(err)s"
                                        , "execute db sync exception. Exception information: %(err)s")
                    , "ER_SYNC_HOST_NOT_FOUND" : (DB_SYNC_ERROR_BASE + 2
                                        , "同步服务器找不到"
                                        , "sync host was not found.")
                    , "ER_SYNC_TABLE_NOT_FOUND" : (DB_SYNC_ERROR_BASE + 3
                                        , "同步数据表不到"
                                        , "sync table was not found.")

                    , "ER_SYNC_NO_TABLE_NEED_SYNC" : (DB_SYNC_ERROR_BASE + 4
                                        , "不存在需要同步的数据表"
                                        , "There is no table need to sync")     
                                        
                    , "ER_SYNC_EXPORT_DATA_FAILED" : (DB_SYNC_ERROR_BASE + 5
                                        , "导出数据失败"
                                        , "Export data failed")   
                                        
                    , "ER_SYNC_UPLOAD_DATA_FAILED" : (DB_SYNC_ERROR_BASE + 6
                                        , "上载数据失败"
                                        , "Upload data failed")  
                    }
err_code_mgr.regist_errors(db_sync_error_defs)