瀏覽代碼

Don't cache XML if it was a timeout

Matt Clarkson 11 年之前
父節點
當前提交
092fe3fac3
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      Libs/CommandLineModules/Core/ctkCmdLineModuleManager.cpp

+ 6 - 0
Libs/CommandLineModules/Core/ctkCmdLineModuleManager.cpp

@@ -30,6 +30,7 @@
 #include "ctkCmdLineModuleReference_p.h"
 #include "ctkCmdLineModuleRunException.h"
 #include "ctkCmdLineModuleXmlException.h"
+#include "ctkCmdLineModuleTimeoutException.h"
 
 #include <ctkException.h>
 
@@ -174,6 +175,11 @@ ctkCmdLineModuleManager::registerModule(const QUrl &location)
       {
         xml = backend->rawXmlDescription(location);
       }
+      catch (const ctkCmdLineModuleTimeoutException& e)
+      {
+        qDebug() << "Extracting XML from " << location.toString() << " timed out.";
+        throw;
+      }
       catch (...)
       {
         // cache the failed attempt