DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
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>
44 #include "DGtal/base/Common.h"
46 
47 namespace DGtal
48 {
49 
53  class IOException: public exception
54  {
55  virtual const char* what() const throw()
56  {
57  return "DGtal IO error";
58  }
59  };
60 
64  class InputException: public exception
65  {
66  public:
67  virtual const char* what() const throw()
68  {
69  return "DGtal bad input error";
70  }
71  };
72 
76  class ConnectivityException: public exception
77  {
78  public:
79  virtual const char* what() const throw()
80  {
81  return "DGtal bad connectivity error";
82  }
83  };
84 
88  class MemoryException: public exception
89  {
90  virtual const char* what() const throw()
91  {
92  return "DGtal memory error";
93  }
94  };
95 
99  class InfiniteNumberException: public exception
100  {
101  virtual const char* what() const throw()
102  {
103  return "DGtal infinite number error";
104  }
105  };
106 
107 
108 } // namespace DGtal
109 
110 
111 // //
113 
114 #endif // !defined Exceptions_h
115 
116 #undef Exceptions_RECURSES
117 #endif // else defined(Exceptions_RECURSES)