Ver código fonte

Merge pull request #10838 from rpastrana/HPCC-19028-DESDLMalformedURL

HPCC-19028 Do not prevent ESP load due to DESDL configuration

Reviewed-By: Mark Kelly <mark.kelly@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 7 anos atrás
pai
commit
60c69e3d77
1 arquivos alterados com 15 adições e 3 exclusões
  1. 15 3
      esp/services/esdl_svc_engine/esdl_binding.cpp

+ 15 - 3
esp/services/esdl_svc_engine/esdl_binding.cpp

@@ -442,10 +442,22 @@ void EsdlServiceImpl::configureUrlMethod(const char *method, IPropertyTree &entr
     entry.setProp("@prot", protocol);
     entry.setProp("@path", path);
 
-    Owned<ISmartSocketFactory> sf = createSmartSocketFactory(iplist, true);
+    try
+    {
+        Owned<ISmartSocketFactory> sf = createSmartSocketFactory(iplist, true);
 
-    connMap.remove(method);
-    connMap.setValue(method, sf.getClear());
+        connMap.remove(method);
+        connMap.setValue(method, sf.getClear());
+    }
+    catch(IException* ie)
+    {
+        ESPLOG(LogMin,"DESDL: Error while setting up connection for method \"%s\" verify its configuration.", method);
+        StringBuffer msg;
+        ie->errorMessage(msg);
+        ESPLOG(LogMin,"%s",msg.str());
+        connMap.remove(method);
+        ie->Release();
+    }
 }
 
 void EsdlServiceImpl::configureTargets(IPropertyTree *cfg, const char *service)