浏览代码

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

- Catches SmartSocket exception
- Logs clear indication of problem

Signed-off-by: Rodrigo Pastrana <rodrigo.pastrana@lexisnexis.com>
Rodrigo Pastrana 7 年之前
父节点
当前提交
f9d819eb41
共有 1 个文件被更改,包括 15 次插入3 次删除
  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)