nlsr: refactor Adjacent to use FaceUri objects

Change-Id: Ib46f70570669c381572182eeea5c047a38a05104
refs: #4063
diff --git a/src/conf-file-processor.cpp b/src/conf-file-processor.cpp
index 70600fb..211609a 100644
--- a/src/conf-file-processor.cpp
+++ b/src/conf-file-processor.cpp
@@ -474,12 +474,13 @@
       try {
         ConfigSection CommandAttriTree = tn->second;
         std::string name = CommandAttriTree.get<std::string>("name");
-        std::string faceUri = CommandAttriTree.get<std::string>("face-uri");
+        std::string uriString = CommandAttriTree.get<std::string>("face-uri");
 
-        ndn::util::FaceUri uri;
-
-        if (!uri.parse(faceUri)) {
-          std::cerr << "Malformed face-uri <" << faceUri << "> for " << name << std::endl;
+        ndn::util::FaceUri faceUri;
+        try {
+          faceUri = ndn::util::FaceUri(uriString);
+        } catch (ndn::util::FaceUri::Error e) {
+          std::cerr << "Malformed face-uri <" << uriString << "> for " << name << std::endl;
           return false;
         }