Fawkes API  Fawkes Development Version
exception.cpp
1 
2 /***************************************************************************
3  * software.cpp - Katana Controller exceptions
4  *
5  * Created: Tue Jan 03 11:40:31 2012
6  * Copyright 2012 Bahram Maleki-Fard, AllemaniACs RoboCup Team
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version. A runtime exception applies to
14  * this software (see LICENSE.GPL_WRE file mentioned below for details).
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Library General Public License for more details.
20  *
21  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22  */
23 
24 #include "exception.h"
25 
26 #include <cmath>
27 
28 namespace fawkes {
29 #if 0 /* just to make Emacs auto-indent happy */
30 }
31 #endif
32 
33 /** @class KatanaNoSolutionException <plugins/katana/exception.h>
34  * No joint configuration for desired target found.
35  * @ingroup Exceptions
36  */
37 /** Constructor
38  * @param format message format, takes sprintf() parameters as variadic arguments
39  */
41  : Exception()
42 {
43  va_list va;
44  va_start(va, format);
45  append_va(format, va);
46  va_end(va);
47 }
48 
49 /** @class KatanaOutOfRangeException <plugins/katana/exception.h>
50  * At least one motor is out of range.
51  * @ingroup Exceptions
52  */
53 /** Constructor
54  * @param format message format, takes sprintf() parameters as variadic arguments
55  */
57  : Exception()
58 {
59  va_list va;
60  va_start(va, format);
61  append_va(format, va);
62  va_end(va);
63 }
64 
65 /** @class KatanaMotorCrashedException <plugins/katana/exception.h>
66  * At least one motor crashed
67  * @ingroup Exceptions
68  */
69 /** Constructor
70  * @param format message format, takes sprintf() parameters as variadic arguments
71  */
73  : Exception()
74 {
75  va_list va;
76  va_start(va, format);
77  append_va(format, va);
78  va_end(va);
79 }
80 
81 /** @class KatanaUnsupportedException <plugins/katana/exception.h>
82  * Unsupported command.
83  * @ingroup Exceptions
84  */
85 /** Constructor
86  * @param format message format, takes sprintf() parameters as variadic arguments
87  */
89  : Exception()
90 {
91  va_list va;
92  va_start(va, format);
93  append_va(format, va);
94  va_end(va);
95 }
96 
97 
98 } // end namespace fawkes
Fawkes library namespace.
Base class for exceptions in Fawkes.
Definition: exception.h:36
void append_va(const char *format, va_list va)
Append messages to the message list.
Definition: exception.cpp:361
KatanaMotorCrashedException(const char *format,...)
Constructor.
Definition: exception.cpp:72
KatanaNoSolutionException(const char *format,...)
Constructor.
Definition: exception.cpp:40
KatanaOutOfRangeException(const char *format,...)
Constructor.
Definition: exception.cpp:56
KatanaUnsupportedException(const char *format,...)
Constructor.
Definition: exception.cpp:88