show missing exchange name in the back-test config

This commit is contained in:
c9s 2022-05-03 16:46:38 +08:00
parent e30c288e7e
commit c9c16f1e47
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -88,7 +88,7 @@ func NewExchange(sourceName types.ExchangeName, sourceExchange types.Exchange, s
// fallback to the legacy account syntax
configAccount, ok = config.Account[sourceName.String()]
if !ok {
return nil, errors.New("config backtest.accounts is not defined, please check your config file.")
return nil, fmt.Errorf("config backtest.accounts[%s] is not defined, please check your config file.", sourceName.String())
} else {
log.Warnf("config backtest.account is deprecated, please use backtest.accounts instead.")
}