DGtal  0.9.2
Exceptions.h
1 
17 #pragma once
18 
31 #if defined(Exceptions_RECURSES)
32 #error Recursive header files inclusion detected in Exceptions.h
33 #else // defined(Exceptions_RECURSES)
34 
35 #define Exceptions_RECURSES
36 
37 #if !defined Exceptions_h
38 
39 #define Exceptions_h
40 
42 // Inclusions
43 #include <iostream>
45 
46 namespace DGtal
47 {
48 
52  class IOException: public std::exception
53  {
54  virtual const char* what() const throw()
55  {
56  return "DGtal IO error";
57  }
58  };
59 
63  class InputException: public std::exception
64  {
65  public:
66  virtual const char* what() const throw()
67  {
68  return "DGtal bad input error";
69  }
70  };
71 
75  class ConnectivityException: public std::exception
76  {
77  public:
78  virtual const char* what() const throw()
79  {
80  return "DGtal bad connectivity error";
81  }
82  };
83 
87  class MemoryException: public std::exception
88  {
89  virtual const char* what() const throw()
90  {
91  return "DGtal memory error";
92  }
93  };
94 
98  class InfiniteNumberException: public std::exception
99  {
100  virtual const char* what() const throw()
101  {
102  return "DGtal infinite number error";
103  }
104  };
105 
106 
107 } // namespace DGtal
108 
109 
110 // //
112 
113 #endif // !defined Exceptions_h
114 
115 #undef Exceptions_RECURSES
116 #endif // else defined(Exceptions_RECURSES)
virtual const char * what() const
Definition: Exceptions.h:54
virtual const char * what() const
Definition: Exceptions.h:89
virtual const char * what() const
Definition: Exceptions.h:66
virtual const char * what() const
Definition: Exceptions.h:100
DGtal is the top-level namespace which contains all DGtal functions and types.
virtual const char * what() const
Definition: Exceptions.h:78