From 0ebe4cf1d34af2ae9cd7b8bb4e8540d0fd3d6dcf Mon Sep 17 00:00:00 2001 From: Prathyusha Lakkireddy Date: Tue, 5 Jan 2021 19:32:09 +0530 Subject: [PATCH] Fixes 331 and 332: Add continue (#344) * Add continue after encountering an error * Fixes 331: Add continue --- cmd/chains.go | 1 + cmd/config.go | 1 + 2 files changed, 2 insertions(+) diff --git a/cmd/chains.go b/cmd/chains.go index b9ccc90437e..f983d2b44e8 100644 --- a/cmd/chains.go +++ b/cmd/chains.go @@ -341,6 +341,7 @@ func filesAdd(dir string) (cfg *Config, err error) { continue } fmt.Printf("%s did not contain valid chain config, skipping...\n", pth) + continue } if err = cfg.AddChain(c); err != nil { diff --git a/cmd/config.go b/cmd/config.go index abeb991d2a5..69b3f348059 100644 --- a/cmd/config.go +++ b/cmd/config.go @@ -200,6 +200,7 @@ func cfgFilesAdd(dir string) (cfg *Config, err error) { p := &relayer.Path{} if err = json.Unmarshal(byt, p); err != nil { fmt.Printf("failed to unmarshal file %s, skipping...\n", pth) + continue } // In the case that order isn't added to the path, add it manually