M/c++_api/inc/DM/Exception.hpp
1 #ifndef DM_EXCEPTION_HPP_INCLUDED
2 #define DM_EXCEPTION_HPP_INCLUDED
3 
4 #ifdef _MSC_VER
5  #pragma once
6 #endif
7 
8 #include "DM/config.hpp"
9 
10 #include <exception>
11 #include "NG_Exception.hpp"
12 
13 #ifdef _MSC_VER
14 # define _GLIBCXX_USE_NOEXCEPT
15 #endif
16 
17 DM_NAMESPACE_BEGIN
18 
19 /// \brief Any Exception thrown by the DM will be derived from this class
20 class DM_API Exception : public NG_exception {
21 public:
22  typedef NG_exception base;
23  Exception();
24  Exception(const char *errorMessage);
25  Exception(const Exception &);
26  Exception& operator=(const Exception &);
27  virtual ~Exception() _GLIBCXX_USE_NOEXCEPT;
28 };
29 
30 /// \brief This exception is thrown if the data manager can load the requested index leaf into memory, since all loaded index leafs are currently in use
31 class DM_API ExceptionDropElement : public Exception {
32 public:
35  ExceptionDropElement& operator=(const ExceptionDropElement &);
36  virtual ~ExceptionDropElement() _GLIBCXX_USE_NOEXCEPT;
37 };
38 
39 /// \brief This exception is thrown if the data manager tries to import (or opens existing ODMs) that exceeds the demo limit (also see setLicenceFile)
40 class DM_API ExceptionDemoLimit : public Exception {
41 public:
44  ExceptionDemoLimit& operator=(const ExceptionDemoLimit &);
45  virtual ~ExceptionDemoLimit() _GLIBCXX_USE_NOEXCEPT;
46 };
47 
48 /// \brief Indicates that a passed argument reference was altered before this exception was thrown.
49 /// Thrown by ICalculator / IFilter("Generic") if 1+ assignments failed, but other 1+ succeeded.
50 class DM_API ExceptionArgumentChanged : public Exception {
51 public:
52  ExceptionArgumentChanged(const char *errorMessage);
55  ~ExceptionArgumentChanged() _GLIBCXX_USE_NOEXCEPT;
56 };
57 
58 /// \brief This exception is thrown if the processing was interrupted (usually by the user)
59 class DM_API ProcessingInterrupted : public Exception {
60 public:
63  ProcessingInterrupted& operator=(const ProcessingInterrupted &);
64  virtual ~ProcessingInterrupted() _GLIBCXX_USE_NOEXCEPT;
65 };
66 
67 
68 DM_NAMESPACE_END
69 
70 #endif //DM_EXCEPTION_HPP_INCLUDED