CTK 0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
ctkCmdLineModuleRunException.h
Go to the documentation of this file.
1/*=============================================================================
2
3 Library: CTK
4
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics
7
8 Licensed under the Apache License, Version 2.0 (the "License");
9 you may not use this file except in compliance with the License.
10 You may obtain a copy of the License at
11
12 http://www.apache.org/licenses/LICENSE-2.0
13
14 Unless required by applicable law or agreed to in writing, software
15 distributed under the License is distributed on an "AS IS" BASIS,
16 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 See the License for the specific language governing permissions and
18 limitations under the License.
19
20=============================================================================*/
21
22#ifndef CTKCMDLINEMODULERUNEXCEPTION_H
23#define CTKCMDLINEMODULERUNEXCEPTION_H
24
25#include "ctkCommandLineModulesCoreExport.h"
26
27#include <ctkException.h>
28
29#if (QT_VERSION < 0x50000)
30#include <QtCore>
31#else
32#include <QtConcurrent>
33#endif
34
35
41class CTK_CMDLINEMODULECORE_EXPORT ctkCmdLineModuleRunException
42 : public QtConcurrent::Exception, public ctkException
43{
44public:
45
46 explicit ctkCmdLineModuleRunException(const QUrl& location, int errorCode,
47 const QString& errorString);
48
49 ctkCmdLineModuleRunException(const QUrl& location, int errorCode,
50 const QString& errorString, const ctkCmdLineModuleRunException& cause);
51
53
55
57
58 QUrl location() const throw();
59 int errorCode() const throw();
60 QString errorString() const throw();
61
62 virtual const char* name() const throw();
63 virtual const char* className() const throw();
64 virtual ctkCmdLineModuleRunException* clone() const;
65 virtual void rethrow() const;
66
67 virtual void raise() const;
68
69private:
70
71 QUrl Location;
72 int ErrorCode;
73 QString ErrorString;
74
75};
76
77#endif // CTKCMDLINEMODULERUNEXCEPTION_H
Exception class to describe problems with running the module.
ctkCmdLineModuleRunException(const QUrl &location, int errorCode, const QString &errorString, const ctkCmdLineModuleRunException &cause)
ctkCmdLineModuleRunException(const ctkCmdLineModuleRunException &o)
ctkCmdLineModuleRunException(const QUrl &location, int errorCode, const QString &errorString)
ctkCmdLineModuleRunException & operator=(const ctkCmdLineModuleRunException &o)
The base class for all exceptions defined in CTK.
Definition: ctkException.h:46