Skip to content

Commit

Permalink
Merge "[FAB-9974] Configtxgen recover profile not found panic"
Browse files Browse the repository at this point in the history
  • Loading branch information
C0rWin authored and Gerrit Code Review committed May 10, 2018
2 parents a9e29b3 + 4ca80aa commit 4ecb0d3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion common/tools/configtxgen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,16 @@ func main() {
if err := recover(); err != nil {
if strings.Contains(fmt.Sprint(err), "Error reading configuration: Unsupported Config Type") {
logger.Error("Could not find configtx.yaml. " +
"Please make sure that FABRIC_CFG_PATH is set to a path " +
"Please make sure that FABRIC_CFG_PATH or --configPath is set to a path " +
"which contains configtx.yaml")
os.Exit(1)
}
if strings.Contains(fmt.Sprint(err), "Could not find profile") {
logger.Error(fmt.Sprint(err) + ". " +
"Please make sure that FABRIC_CFG_PATH or --configPath is set to a path " +
"which contains configtx.yaml with the specified profile")
os.Exit(1)
}
logger.Panic(err)
}
}()
Expand Down

0 comments on commit 4ecb0d3

Please sign in to comment.