Fawkes API  Fawkes Development Version
exceptions.cpp
1 /***************************************************************************
2  * exceptions.cpp - Fawkes tf exceptions
3  *
4  * Created: Tue Oct 18 16:41:19 2011
5  * Copyright 2011 Tim Niemueller [www.niemueller.de]
6  ****************************************************************************/
7 
8 /* This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version. A runtime exception applies to
12  * this software (see LICENSE.GPL_WRE file mentioned below for details).
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU Library General Public License for more details.
18  *
19  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
20  */
21 
22 #include <tf/exceptions.h>
23 
24 namespace fawkes {
25  namespace tf {
26 #if 0 /* just to make Emacs auto-indent happy */
27  }
28 }
29 #endif
30 
31 /** @class TransformException
32  * Base class for fawkes tf exceptions.
33  */
34 
35 /** Constructor. */
37  : Exception() {}
38 
39 /** @class ConnectivityException
40  * No connection between two frames in tree.
41  * While looking for a connection between two frames in the transform
42  * tree it was detected that there is no such connection.
43  */
44 
45 /** Constructor.
46  * @param format format of explanatory message of the error, format
47  * and parameters similar to sprintf.
48  */
51 {
52  va_list args;
53  va_start(args, format);
54  append_nolock_va(format, args);
55  va_end(args);
56 }
57 
58 /** @class LookupException
59  * A frame could not be looked up.
60  * Thrown if you try to access a frame which is unknown to the
61  * transforms system.
62  */
63 
64 /** Constructor.
65  * @param format format of explanatory message of the error, format
66  * and parameters similar to sprintf.
67  */
68 LookupException::LookupException(const char *format, ...)
70 {
71  va_list args;
72  va_start(args, format);
73  append_nolock_va(format, args);
74  va_end(args);
75 }
76 
77 /** @class ExtrapolationException
78  * Request would have required extrapolation beyond current limits.
79  */
80 
81 /** Constructor.
82  * @param format format of explanatory message of the error, format
83  * and parameters similar to sprintf.
84  */
87 {
88  va_list args;
89  va_start(args, format);
90  append_nolock_va(format, args);
91  va_end(args);
92 }
93 
94 /** @class InvalidArgumentException
95  * Passed argument was invalid.
96  * A typica problem is passing an uninitialized quaternion (0,0,0,0).
97  */
98 
99 /** Constructor.
100  * @param format format of explanatory message of the error, format
101  * and parameters similar to sprintf.
102  */
105 {
106  va_list args;
107  va_start(args, format);
108  append_nolock_va(format, args);
109  va_end(args);
110 }
111 
112 
113 /** @class DisabledException
114  * The requested feature is disabled.
115  */
116 
117 /** Constructor.
118  * @param format format of explanatory message of the error, format
119  * and parameters similar to sprintf.
120  */
121 DisabledException::DisabledException(const char *format, ...)
123 {
124  va_list args;
125  va_start(args, format);
126  append_nolock_va(format, args);
127  va_end(args);
128 }
129 
130 
131 } // end namespace tf
132 } // end namespace fawkes
ConnectivityException(const char *format,...)
Constructor.
Definition: exceptions.cpp:49
LookupException(const char *format,...)
Constructor.
Definition: exceptions.cpp:68
Base class for fawkes tf exceptions.
Definition: exceptions.h:34
Fawkes library namespace.
TransformException()
Constructor.
Definition: exceptions.cpp:36
ExtrapolationException(const char *format,...)
Constructor.
Definition: exceptions.cpp:85
Base class for exceptions in Fawkes.
Definition: exception.h:36
void append_nolock_va(const char *format, va_list va)
Append messages without lock by formatted string.
Definition: exception.cpp:460
InvalidArgumentException(const char *format,...)
Constructor.
Definition: exceptions.cpp:103
DisabledException(const char *format,...)
Constructor.
Definition: exceptions.cpp:121