CTK  0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
ctkApplicationException.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 CTKAPPLICATIONEXCEPTION_H
23 #define CTKAPPLICATIONEXCEPTION_H
24 
25 #include <ctkPluginFrameworkExport.h>
26 
27 #include <ctkException.h>
28 
57 class CTK_PLUGINFW_EXPORT ctkApplicationException : public ctkException
58 {
59 
60 private:
61 
62  int errorCode;
63 
64 public:
65 
69  static const int APPLICATION_LOCKED; // = 0x01;
70 
76  static const int APPLICATION_NOT_LAUNCHABLE; // = 0x02;
77 
82  static const int APPLICATION_INTERNAL_ERROR; // = 0x03;
83 
89  static const int APPLICATION_SCHEDULING_FAILED; // = 0x04;
90 
95  static const int APPLICATION_DUPLICATE_SCHEDULE_ID; // = 0x05;
96 
101  static const int APPLICATION_EXITVALUE_NOT_AVAILABLE; // = 0x06;
102 
107  static const int APPLICATION_INVALID_STARTUP_ARGUMENT; // = 0x07;
108 
113  ctkApplicationException(int errorCode);
114 
121  ctkApplicationException(int errorCode, const ctkException& cause);
122 
128  ctkApplicationException(int errorCode, const QString& message);
129 
137  ctkApplicationException(int errorCode, const QString& message, const ctkException& cause);
138 
140 
141  const char* name() const throw();
142 
143  ctkApplicationException* clone() const;
144 
145  void rethrow() const;
146 
152  int GetErrorCode() const;
153 };
154 
155 #endif // CTKAPPLICATIONEXCEPTION_H
ctkApplicationException(int errorCode, const QString &message)
static const int APPLICATION_NOT_LAUNCHABLE
ctkApplicationException(int errorCode)
static const int APPLICATION_EXITVALUE_NOT_AVAILABLE
static const int APPLICATION_SCHEDULING_FAILED
static const int APPLICATION_INVALID_STARTUP_ARGUMENT
static const int APPLICATION_INTERNAL_ERROR
static const int APPLICATION_DUPLICATE_SCHEDULE_ID
ctkApplicationException(int errorCode, const QString &message, const ctkException &cause)
ctkApplicationException(int errorCode, const ctkException &cause)
The base class for all exceptions defined in CTK.
Definition: ctkException.h:46