Fawkes API  Fawkes Development Version
exception.cpp
00001 
00002 /***************************************************************************
00003  *  software.cpp - Katana Controller exceptions
00004  *
00005  *  Created: Tue Jan 03 11:40:31 2012
00006  *  Copyright  2012  Bahram Maleki-Fard, AllemaniACs RoboCup Team
00007  *
00008  ****************************************************************************/
00009 
00010 /*  This program is free software; you can redistribute it and/or modify
00011  *  it under the terms of the GNU General Public License as published by
00012  *  the Free Software Foundation; either version 2 of the License, or
00013  *  (at your option) any later version. A runtime exception applies to
00014  *  this software (see LICENSE.GPL_WRE file mentioned below for details).
00015  *
00016  *  This program is distributed in the hope that it will be useful,
00017  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  *  GNU Library General Public License for more details.
00020  *
00021  *  Read the full text in the LICENSE.GPL_WRE file in the doc directory.
00022  */
00023 
00024 #include "exception.h"
00025 
00026 #include <cmath>
00027 
00028 namespace fawkes {
00029 #if 0 /* just to make Emacs auto-indent happy */
00030 }
00031 #endif
00032 
00033 /** @class KatanaNoSolutionException <plugins/katana/exception.h>
00034  * No joint configuration for desired target found.
00035  * @ingroup Exceptions
00036  */
00037 /** Constructor
00038  * @param format message format, takes sprintf() parameters as variadic arguments
00039  */
00040 KatanaNoSolutionException::KatanaNoSolutionException(const char *format, ...) throw()
00041   : Exception()
00042 {
00043   va_list va;
00044   va_start(va, format);
00045   append_va(format, va);
00046   va_end(va);
00047 }
00048 
00049 /** @class KatanaOutOfRangeException <plugins/katana/exception.h>
00050  * At least one motor is out of range.
00051  * @ingroup Exceptions
00052  */
00053 /** Constructor
00054  * @param format message format, takes sprintf() parameters as variadic arguments
00055  */
00056 KatanaOutOfRangeException::KatanaOutOfRangeException(const char *format, ...) throw()
00057   : Exception()
00058 {
00059   va_list va;
00060   va_start(va, format);
00061   append_va(format, va);
00062   va_end(va);
00063 }
00064 
00065 /** @class KatanaMotorCrashedException <plugins/katana/exception.h>
00066  * At least one motor crashed
00067  * @ingroup Exceptions
00068  */
00069 /** Constructor
00070  * @param format message format, takes sprintf() parameters as variadic arguments
00071  */
00072 KatanaMotorCrashedException::KatanaMotorCrashedException(const char *format, ...) throw()
00073   : Exception()
00074 {
00075   va_list va;
00076   va_start(va, format);
00077   append_va(format, va);
00078   va_end(va);
00079 }
00080 
00081 /** @class KatanaUnsupportedException <plugins/katana/exception.h>
00082  * Unsupported command.
00083  * @ingroup Exceptions
00084  */
00085 /** Constructor
00086  * @param format message format, takes sprintf() parameters as variadic arguments
00087  */
00088 KatanaUnsupportedException::KatanaUnsupportedException(const char *format, ...) throw()
00089   : Exception()
00090 {
00091   va_list va;
00092   va_start(va, format);
00093   append_va(format, va);
00094   va_end(va);
00095 }
00096 
00097 
00098 } // end namespace fawkes