Medical Imaging Interaction Toolkit  2018.4.99-12ad79a3
Medical Imaging Interaction Toolkit
mitkPAExceptions.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef MITKEXCEPTIONS_H
14 #define MITKEXCEPTIONS_H
15 
17 
18 #include <mitkCommon.h>
19 
20 //std
21 #include <string>
22 #include <exception>
23 
24 namespace mitk {
25  namespace pa {
30  {
31  std::string m_InvalidParameter;
32  public:
33  InvalidInputException(std::string invalidparameter)
34  {
35  m_InvalidParameter = invalidparameter;
36  MITK_ERROR << GetFullMessage();
37  }
38 
39  const std::string GetFullMessage() const throw()
40  {
41  return "InvalidInputException: " + m_InvalidParameter;
42  }
43  };
44 
49  {
50  std::string m_ValueType;
51  public:
52  InvalidValueException(std::string valueType)
53  {
54  m_ValueType = valueType;
55  MITK_ERROR << GetFullMessage();
56  }
57 
58  const std::string GetFullMessage() const throw()
59  {
60  return "InvalidValueException: " + m_ValueType;
61  }
62  };
63  }
64 }
65 
66 #endif // MITKEXCEPTIONS_H
InvalidInputException(std::string invalidparameter)
#define MITK_ERROR
Definition: mitkLogMacros.h:20
DataCollection - Class to facilitate loading/accessing structured data.
const std::string GetFullMessage() const
this exception is thrown if an invalid input occurs
InvalidValueException(std::string valueType)
const std::string GetFullMessage() const
this exception is thrown if an invalid value is supposed to be processed
#define MITKPHOTOACOUSTICSLIB_EXPORT