mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-29 02:00:54 +02:00
lnd: standardize printing to stdout
With this commit we standardize the error messages in the config parsing section of the main package. We only print to stdout/stderr in a single place and also make sure the same error is printed to the log (which might or might not yet be initialized at that point).
This commit is contained in:
@ -601,7 +601,7 @@ func (d *DefaultWalletImpl) BuildChainControl(
|
||||
*walletConfig, partialChainControl.Cfg.BlockCache,
|
||||
)
|
||||
if err != nil {
|
||||
fmt.Printf("unable to create wallet controller: %v\n", err)
|
||||
err := fmt.Errorf("unable to create wallet controller: %v", err)
|
||||
d.logger.Error(err)
|
||||
return nil, nil, err
|
||||
}
|
||||
@ -676,7 +676,7 @@ func (d *RPCSignerWalletImpl) BuildChainControl(
|
||||
*walletConfig, partialChainControl.Cfg.BlockCache,
|
||||
)
|
||||
if err != nil {
|
||||
fmt.Printf("unable to create wallet controller: %v\n", err)
|
||||
err := fmt.Errorf("unable to create wallet controller: %v", err)
|
||||
d.logger.Error(err)
|
||||
return nil, nil, err
|
||||
}
|
||||
@ -691,7 +691,8 @@ func (d *RPCSignerWalletImpl) BuildChainControl(
|
||||
rpcwallet.DefaultRPCTimeout,
|
||||
)
|
||||
if err != nil {
|
||||
fmt.Printf("unable to create RPC remote signing wallet %v", err)
|
||||
err := fmt.Errorf("unable to create RPC remote signing wallet "+
|
||||
"%v", err)
|
||||
d.logger.Error(err)
|
||||
return nil, nil, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user