Преглед на файлове

Add timeout exception type

Matt Clarkson преди 11 години
родител
ревизия
070d17c7af

+ 1 - 0
Libs/CommandLineModules/Core/CMakeLists.txt

@@ -42,6 +42,7 @@ set(KIT_SRCS
   ctkCmdLineModuleXmlProgressWatcher.cpp
   ctkCmdLineModuleReference.cpp
   ctkCmdLineModuleRunException.cpp
+  ctkCmdLineModuleTimeoutException.cpp
   ctkCmdLineModuleXmlException.cpp
   ctkCmdLineModuleXmlMsgHandler_p.h
   ctkCmdLineModuleXmlMsgHandler.cpp

+ 23 - 0
Libs/CommandLineModules/Core/ctkCmdLineModuleTimeoutException.cpp

@@ -0,0 +1,23 @@
+/*=============================================================================
+
+  Library: CTK
+
+  Copyright (c) University College London
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+=============================================================================*/
+
+#include "ctkCmdLineModuleTimeoutException.h"
+
+CTK_IMPLEMENT_EXCEPTION(ctkCmdLineModuleTimeoutException, ctkException, "Command Line Module time-out exception")

+ 35 - 0
Libs/CommandLineModules/Core/ctkCmdLineModuleTimeoutException.h

@@ -0,0 +1,35 @@
+/*=============================================================================
+
+  Library: CTK
+
+  Copyright (c) University College London
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+=============================================================================*/
+
+#ifndef CTKCMDLINEMODULETIMEOUTEXCEPTION_H
+#define CTKCMDLINEMODULETIMEOUTEXCEPTION_H
+
+#include <ctkException.h>
+
+#include "ctkCommandLineModulesCoreExport.h"
+
+/**
+ * \class ctkCmdLineModuleTimeoutException
+ * \brief Exception class to describe problems with time-outs.
+ * \ingroup CommandLineModulesCore_API
+ */
+CTK_DECLARE_EXCEPTION(CTK_CMDLINEMODULECORE_EXPORT, ctkCmdLineModuleTimeoutException, ctkException)
+
+#endif // CTKCMDLINEMODULETIMEOUTEXCEPTION_H