mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-22 14:22:37 +01:00
Merge pull request #5802 from yyforyongyu/5318-fix-addr-format
lndcfg: give verbose err when failed to load config
This commit is contained in:
commit
91edfaed85
3 changed files with 7 additions and 1 deletions
|
@ -23,6 +23,7 @@ func main() {
|
|||
if err != nil {
|
||||
if e, ok := err.(*flags.Error); !ok || e.Type != flags.ErrHelp {
|
||||
// Print error if not due to help request.
|
||||
err = fmt.Errorf("failed to load config: %w", err)
|
||||
_, _ = fmt.Fprintln(os.Stderr, err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
|
|
@ -234,6 +234,10 @@ you.
|
|||
`lncli deletepayments`](https://github.com/lightningnetwork/lnd/pull/5699)
|
||||
command.
|
||||
|
||||
* [Add more verbose error printed to
|
||||
console](https://github.com/lightningnetwork/lnd/pull/5802) when `lnd` fails
|
||||
loading the user specified config.
|
||||
|
||||
## Code Health
|
||||
|
||||
### Code cleanup, refactor, typo fixes
|
||||
|
|
|
@ -35,7 +35,8 @@ func NormalizeAddresses(addrs []string, defaultPort string,
|
|||
addr, defaultPort, tcpResolver,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, fmt.Errorf("parse address %s failed: %w",
|
||||
addr, err)
|
||||
}
|
||||
|
||||
if _, ok := seen[parsedAddr.String()]; !ok {
|
||||
|
|
Loading…
Add table
Reference in a new issue