Skip to content
This repository has been archived by the owner on Nov 17, 2022. It is now read-only.

Commit

Permalink
Merge pull request #32 from langhorst/4-print-usage-info-on-panic
Browse files Browse the repository at this point in the history
#4 Print usage info on panic
  • Loading branch information
avive authored Jun 30, 2021
2 parents 3697ee3 + a3bcd85 commit 3ef7f4e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"os"

"github.com/spacemeshos/smrepl/client"
"github.com/spacemeshos/smrepl/log"
"github.com/spacemeshos/smrepl/repl"
)

Expand Down Expand Up @@ -40,6 +41,15 @@ func main() {
}
}

// TODO: change this to use the health service when it is ready
_, err = be.GetMeshInfo()
if err != nil {
log.Error("Failed to connect to mesh service at %v: %v", be.ServerInfo(), err)
fmt.Println()
flag.Usage()
os.Exit(1)
}

repl.Start(be)
}

Expand Down

0 comments on commit 3ef7f4e

Please sign in to comment.