[Mod]增加ctpGateway认证失败的报错信息输出

This commit is contained in:
vn.py 2017-12-05 10:13:58 +08:00
parent 06b0090271
commit e8981a97c8
3 changed files with 11 additions and 3 deletions

View File

@ -1 +1 @@
rGu69UiZhQTMFXCkVHH1kg== tBr8RMewRABqiW7HBOkrkg==

View File

@ -9,8 +9,10 @@
"darkStyle": true, "darkStyle": true,
"language": "chinese", "language": "chinese",
"logActive": false, "logActive": true,
"logLevel": "debug", "logLevel": "debug",
"logConsole": true, "logConsole": true,
"logFile": true "logFile": true,
"tdPenalty": ["IF", "IH", "IC"]
} }

View File

@ -542,6 +542,12 @@ class CtpTdApi(TdApi):
self.writeLog(text.TRADING_SERVER_AUTHENTICATED) self.writeLog(text.TRADING_SERVER_AUTHENTICATED)
self.login() self.login()
else:
err = VtErrorData()
err.gatewayName = self.gatewayName
err.errorID = error['ErrorID']
err.errorMsg = error['ErrorMsg'].decode('gbk')
self.gateway.onError(err)
#---------------------------------------------------------------------- #----------------------------------------------------------------------
def onRspUserLogin(self, data, error, n, last): def onRspUserLogin(self, data, error, n, last):