cmd: log errors
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/tendermint/basecoin/cmd/commands"
|
||||
@@ -24,5 +25,9 @@ func main() {
|
||||
commands.AccountCmd,
|
||||
commands.UnsafeResetAllCmd,
|
||||
}
|
||||
app.Run(os.Args)
|
||||
err := app.Run(os.Args)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
+3
-1
@@ -119,9 +119,11 @@ func cmdSendTx(c *cli.Context) error {
|
||||
fmt.Println(string(wire.JSONBytes(tx)))
|
||||
|
||||
// broadcast the transaction to tendermint
|
||||
if _, _, err := broadcastTx(c, tx); err != nil {
|
||||
data, log, err := broadcastTx(c, tx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
fmt.Printf("Response: %X ; %s\n", data, log)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user