You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by xi...@apache.org on 2019/11/27 03:23:39 UTC

[dubbo-go] branch master updated: should return error when `NewURL` failed.

This is an automated email from the ASF dual-hosted git repository.

xinminghe pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-go.git


The following commit(s) were added to refs/heads/master by this push:
     new e4561b6  should return error when `NewURL` failed.
     new 78e7ed0  Merge pull request #266 from imxyb/bugfix/return-error
e4561b6 is described below

commit e4561b6aa638ef3e61a37130e8f04db2bb878132
Author: imxyb <xy...@gmail.com>
AuthorDate: Tue Nov 26 21:52:04 2019 +0800

    should return error when `NewURL` failed.
    
    Signed-off-by: imxyb <xy...@gmail.com>
---
 config_center/parser/configuration_parser.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/config_center/parser/configuration_parser.go b/config_center/parser/configuration_parser.go
index 1ce6594..85033ce 100644
--- a/config_center/parser/configuration_parser.go
+++ b/config_center/parser/configuration_parser.go
@@ -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)
 		}