Spatial C++ Library
Generic Multi-Dimensional Containers and Spatial Operations
exception.hpp
1 // -*- C++ -*-
2 //
3 // Copyright Sylvain Bougerel 2009 - 2013.
4 // Distributed under the Boost Software License, Version 1.0.
5 // (See accompanying file COPYING or copy at
6 // http://www.boost.org/LICENSE_1_0.txt)
7 
13 #ifndef SPATIAL_EXCEPTION_HPP
14 #define SPATIAL_EXCEPTION_HPP
15 
16 #include <stdexcept>
17 #include "spatial.hpp"
18 
19 namespace spatial
20 {
25  struct invalid_rank : std::logic_error
26  {
27  explicit invalid_rank(const std::string& arg)
28  : std::logic_error(arg) { }
29  };
30 
34  struct invalid_odd_rank : std::logic_error
35  {
36  explicit invalid_odd_rank(const std::string& arg)
37  : std::logic_error(arg) { }
38  };
39 
44  struct invalid_dimension : std::logic_error
45  {
46  explicit invalid_dimension(const std::string& arg)
47  : std::logic_error(arg) { }
48  };
49 
53  struct invalid_node : std::logic_error
54  {
55  explicit invalid_node(const std::string& arg)
56  : std::logic_error(arg) { }
57  };
58 
62  struct invalid_iterator : std::logic_error
63  {
64  explicit invalid_iterator(const std::string& arg)
65  : std::logic_error(arg) { }
66  };
67 
72  struct invalid_empty_container : std::logic_error
73  {
74  explicit invalid_empty_container(const std::string& arg)
75  : std::logic_error(arg) { }
76  };
77 
86  struct invalid_bounds : std::logic_error
87  {
88  explicit invalid_bounds(const std::string& arg)
89  : std::logic_error(arg) { }
90  };
91 
97  struct invalid_box : std::logic_error
98  {
99  explicit invalid_box(const std::string& arg)
100  : std::logic_error(arg) { }
101  };
102 
110  struct invalid_distance : std::logic_error
111  {
112  explicit invalid_distance(const std::string& arg)
113  : std::logic_error(arg) { }
114  };
115 
123  struct arithmetic_error : std::logic_error
124  {
125  explicit arithmetic_error(const std::string& arg)
126  : std::logic_error(arg) { }
127  };
128 
129 } // namespace spatial
130 
131 #endif // SPATIAL_EXCEPTION_HPP
Thrown to report that an invalid node was passed as an argument.
Definition: exception.hpp:53
Thrown to report that an empty container was passed as an argument, while the function does not accep...
Definition: exception.hpp:72
arithmetic_error(const std::string &arg)
Definition: exception.hpp:125
invalid_box(const std::string &arg)
Definition: exception.hpp:99
Thrown to report that an invalid rank was passed as an argument.
Definition: exception.hpp:25
invalid_rank(const std::string &arg)
Definition: exception.hpp:27
STL namespace.
Thrown to report that an invalid range bound has been given as argument.
Definition: exception.hpp:86
invalid_odd_rank(const std::string &arg)
Definition: exception.hpp:36
Thrown to report that an arithmetic error has occured during a calculation.
Definition: exception.hpp:123
Thrown to report that an invalid dimension was passed as an argument.
Definition: exception.hpp:44
Thrown to report that a box has incorrect coordinates with regards to its layout. ...
Definition: exception.hpp:97
Thrown to report that an negative distance has been passed as a parameter while distances are expecte...
Definition: exception.hpp:110
invalid_node(const std::string &arg)
Definition: exception.hpp:55
Thrown to report that an invalid iterator was passed as an argument.
Definition: exception.hpp:62
invalid_distance(const std::string &arg)
Definition: exception.hpp:112
invalid_dimension(const std::string &arg)
Definition: exception.hpp:46
invalid_empty_container(const std::string &arg)
Definition: exception.hpp:74
The main namespace used in the library.
Definition: algorithm.hpp:23
invalid_iterator(const std::string &arg)
Definition: exception.hpp:64
Thrown to report that an odd rank value was passed as a argument.
Definition: exception.hpp:34
invalid_bounds(const std::string &arg)
Definition: exception.hpp:88