Skip to content

Commit

Permalink
should return error when NewURL failed.
Browse files Browse the repository at this point in the history
Signed-off-by: imxyb <xyb4638@gmail.com>
  • Loading branch information
imxyb committed Nov 26, 2019
1 parent 6a691cd commit e4561b6
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 e4561b6

Please sign in to comment.