Skip to content

Commit

Permalink
Merge pull request #266 from imxyb/bugfix/return-error
Browse files Browse the repository at this point in the history
should return error when `NewURL` failed.
  • Loading branch information
hxmhlt committed Nov 27, 2019
2 parents d77b772 + e4561b6 commit 78e7ed0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config_center/parser/configuration_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,14 @@ func serviceItemToUrls(item ConfigItem, config ConfiguratorConfig) ([]*common.UR
newUrlStr = newUrlStr + v
url, err := common.NewURL(context.Background(), newUrlStr)
if err != nil {
perrors.WithStack(err)
return nil, perrors.WithStack(err)
}
urls = append(urls, &url)
}
} else {
url, err := common.NewURL(context.Background(), urlStr)
if err != nil {
perrors.WithStack(err)
return nil, perrors.WithStack(err)
}
urls = append(urls, &url)
}
Expand Down

0 comments on commit 78e7ed0

Please sign in to comment.