ソースを参照

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