Accounts V2: Remove traces from command errors (#6692)

* Remove traces from errors for accounts command
* Merge refs/heads/master into remove-stack
* Merge refs/heads/master into remove-stack
* Merge refs/heads/master into remove-stack
* Merge refs/heads/master into remove-stack
* Merge refs/heads/master into remove-stack
This commit is contained in:
Ivan Martinez 2020-07-22 20:11:00 -04:00 committed by GitHub
parent 73a9429f1e
commit cf57db910c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 7 deletions

View File

@ -25,7 +25,7 @@ this command outputs a deposit data string which is required to become a validat
},
Action: func(cliCtx *cli.Context) error {
if err := NewAccount(cliCtx); err != nil {
log.WithError(err).Fatal("Could not create new account")
log.Fatalf("Could not create new account: %v", err)
}
return nil
},
@ -40,7 +40,7 @@ this command outputs a deposit data string which is required to become a validat
},
Action: func(cliCtx *cli.Context) error {
if err := ListAccounts(cliCtx); err != nil {
log.WithError(err).Fatal("Could not list accounts")
log.Fatalf("Could not list accounts: %v", err)
}
return nil
},
@ -56,7 +56,7 @@ this command outputs a deposit data string which is required to become a validat
},
Action: func(cliCtx *cli.Context) error {
if err := ExportAccount(cliCtx); err != nil {
log.WithError(err).Fatal("Could not export accounts")
log.Fatalf("Could not export accounts: %v", err)
}
return nil
},
@ -72,7 +72,7 @@ this command outputs a deposit data string which is required to become a validat
},
Action: func(cliCtx *cli.Context) error {
if err := ImportAccount(cliCtx); err != nil {
log.WithError(err).Fatal("Could not import accounts")
log.Fatalf("Could not import accounts: %v", err)
}
return nil
},

View File

@ -27,7 +27,7 @@ var WalletCommands = &cli.Command{
},
Action: func(cliCtx *cli.Context) error {
if err := CreateWallet(cliCtx); err != nil {
log.WithError(err).Fatal("Could not create a wallet")
log.Fatalf("Could not create a wallet: %v", err)
}
return nil
},
@ -44,7 +44,7 @@ var WalletCommands = &cli.Command{
},
Action: func(cliCtx *cli.Context) error {
if err := EditWalletConfiguration(cliCtx); err != nil {
log.WithError(err).Fatal("Could not edit wallet configuration")
log.Fatalf("Could not edit wallet configuration: %v", err)
}
return nil
},
@ -58,7 +58,12 @@ var WalletCommands = &cli.Command{
flags.MnemonicFileFlag,
flags.PasswordFileFlag,
},
Action: RecoverWallet,
Action: func(cliCtx *cli.Context) error {
if err := RecoverWallet(cliCtx); err != nil {
log.Fatalf("Could not recover wallet: %v", err)
}
return nil
},
},
},
}