tf2 rolling
tf2 maintains the relationship between coordinate frames in a tree structure buffered in time, and lets the user transform points, vectors, etc between any two coordinate frames at any desired point in time.
Loading...
Searching...
No Matches
exceptions.hpp
Go to the documentation of this file.
1// Copyright 2008, Willow Garage, Inc. All rights reserved.
2//
3// Redistribution and use in source and binary forms, with or without
4// modification, are permitted provided that the following conditions are met:
5//
6// * Redistributions of source code must retain the above copyright
7// notice, this list of conditions and the following disclaimer.
8//
9// * Redistributions in binary form must reproduce the above copyright
10// notice, this list of conditions and the following disclaimer in the
11// documentation and/or other materials provided with the distribution.
12//
13// * Neither the name of the Willow Garage nor the names of its
14// contributors may be used to endorse or promote products derived from
15// this software without specific prior written permission.
16//
17// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
21// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27// POSSIBILITY OF SUCH DAMAGE.
28
32
33#ifndef TF2__EXCEPTIONS_HPP_
34#define TF2__EXCEPTIONS_HPP_
35
36#include <stdexcept>
37#include <cstdint>
38#include <string>
39
41
42namespace tf2
43{
44
45enum class TF2Error : std::uint8_t
46{
47 // While the TF2_ prefix here is a bit redundant, it also prevents us from
48 // colliding with Windows defines (specifically, NO_ERROR).
59};
60
65class TransformException : public std::runtime_error
66{
67public:
69 explicit TransformException(const std::string errorDescription)
70 : std::runtime_error(errorDescription)
71 {
72 }
73};
74
75
82{
83public:
85 explicit ConnectivityException(const std::string errorDescription)
86 : tf2::TransformException(errorDescription)
87 {
88 }
89};
90
91
101{
102public:
104 explicit LookupException(const std::string errorDescription)
105 : tf2::TransformException(errorDescription)
106 {
107 }
108};
109
114{
115public:
117 explicit ExtrapolationException(const std::string errorDescription)
118 : tf2::TransformException(errorDescription)
119 {
120 }
121};
122
127{
128public:
130 explicit BackwardExtrapolationException(const std::string errorDescription)
131 : ExtrapolationException(errorDescription)
132 {
133 }
134};
135
140{
141public:
143 explicit ForwardExtrapolationException(const std::string errorDescription)
144 : ExtrapolationException(errorDescription)
145 {
146 }
147};
148
153{
154public:
156 explicit NoDataForExtrapolationException(const std::string errorDescription)
157 : ExtrapolationException(errorDescription)
158 {
159 }
160};
161
168{
169public:
171 explicit InvalidArgumentException(const std::string errorDescription)
172 : tf2::TransformException(errorDescription) {}
173};
174
180{
181public:
183 explicit TimeoutException(const std::string errorDescription)
184 : tf2::TransformException(errorDescription)
185 {
186 }
187};
188} // namespace tf2
189#endif // TF2__EXCEPTIONS_HPP_
BackwardExtrapolationException(const std::string errorDescription)
Definition exceptions.hpp:130
ConnectivityException(const std::string errorDescription)
Definition exceptions.hpp:85
ExtrapolationException(const std::string errorDescription)
Definition exceptions.hpp:117
ForwardExtrapolationException(const std::string errorDescription)
Definition exceptions.hpp:143
InvalidArgumentException(const std::string errorDescription)
Definition exceptions.hpp:171
LookupException(const std::string errorDescription)
Definition exceptions.hpp:104
NoDataForExtrapolationException(const std::string errorDescription)
Definition exceptions.hpp:156
TimeoutException(const std::string errorDescription)
Definition exceptions.hpp:183
TransformException(const std::string errorDescription)
Definition exceptions.hpp:69
Definition buffer_core.hpp:58
TF2Error
Definition exceptions.hpp:46
@ TF2_NO_ERROR
Definition exceptions.hpp:49
@ TF2_EXTRAPOLATION_ERROR
Definition exceptions.hpp:52
@ TF2_INVALID_ARGUMENT_ERROR
Definition exceptions.hpp:53
@ TF2_TIMEOUT_ERROR
Definition exceptions.hpp:54
@ TF2_LOOKUP_ERROR
Definition exceptions.hpp:50
@ TF2_BACKWARD_EXTRAPOLATION_ERROR
Definition exceptions.hpp:56
@ TF2_TRANSFORM_ERROR
Definition exceptions.hpp:55
@ TF2_NO_DATA_FOR_EXTRAPOLATION_ERROR
Definition exceptions.hpp:58
@ TF2_FORWARD_EXTRAPOLATION_ERROR
Definition exceptions.hpp:57
@ TF2_CONNECTIVITY_ERROR
Definition exceptions.hpp:51
#define TF2_PUBLIC
Definition visibility_control.h:57