Fawkes API
Fawkes Development Version
|
00001 /*************************************************************************** 00002 * exceptions.cpp - Fawkes tf exceptions 00003 * 00004 * Created: Tue Oct 18 16:41:19 2011 00005 * Copyright 2011 Tim Niemueller [www.niemueller.de] 00006 ****************************************************************************/ 00007 00008 /* This program is free software; you can redistribute it and/or modify 00009 * it under the terms of the GNU General Public License as published by 00010 * the Free Software Foundation; either version 2 of the License, or 00011 * (at your option) any later version. A runtime exception applies to 00012 * this software (see LICENSE.GPL_WRE file mentioned below for details). 00013 * 00014 * This program is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 * GNU Library General Public License for more details. 00018 * 00019 * Read the full text in the LICENSE.GPL_WRE file in the doc directory. 00020 */ 00021 00022 #include <tf/exceptions.h> 00023 00024 namespace fawkes { 00025 namespace tf { 00026 #if 0 /* just to make Emacs auto-indent happy */ 00027 } 00028 } 00029 #endif 00030 00031 /** @class TransformException 00032 * Base class for fawkes tf exceptions. 00033 */ 00034 00035 /** Constructor. */ 00036 TransformException::TransformException() 00037 : Exception() {} 00038 00039 /** @class ConnectivityException 00040 * No connection between two frames in tree. 00041 * While looking for a connection between two frames in the transform 00042 * tree it was detected that there is no such connection. 00043 */ 00044 00045 /** Constructor. 00046 * @param format format of explanatory message of the error, format 00047 * and parameters similar to sprintf. 00048 */ 00049 ConnectivityException::ConnectivityException(const char *format, ...) 00050 : TransformException() 00051 { 00052 va_list args; 00053 va_start(args, format); 00054 append_nolock_va(format, args); 00055 va_end(args); 00056 } 00057 00058 /** @class LookupException 00059 * A frame could not be looked up. 00060 * Thrown if you try to access a frame which is unknown to the 00061 * transforms system. 00062 */ 00063 00064 /** Constructor. 00065 * @param format format of explanatory message of the error, format 00066 * and parameters similar to sprintf. 00067 */ 00068 LookupException::LookupException(const char *format, ...) 00069 : TransformException() 00070 { 00071 va_list args; 00072 va_start(args, format); 00073 append_nolock_va(format, args); 00074 va_end(args); 00075 } 00076 00077 /** @class ExtrapolationException 00078 * Request would have required extrapolation beyond current limits. 00079 */ 00080 00081 /** Constructor. 00082 * @param format format of explanatory message of the error, format 00083 * and parameters similar to sprintf. 00084 */ 00085 ExtrapolationException::ExtrapolationException(const char *format, ...) 00086 : TransformException() 00087 { 00088 va_list args; 00089 va_start(args, format); 00090 append_nolock_va(format, args); 00091 va_end(args); 00092 } 00093 00094 /** @class InvalidArgumentException 00095 * Passed argument was invalid. 00096 * A typica problem is passing an uninitialized quaternion (0,0,0,0). 00097 */ 00098 00099 /** Constructor. 00100 * @param format format of explanatory message of the error, format 00101 * and parameters similar to sprintf. 00102 */ 00103 InvalidArgumentException::InvalidArgumentException(const char *format, ...) 00104 : TransformException() 00105 { 00106 va_list args; 00107 va_start(args, format); 00108 append_nolock_va(format, args); 00109 va_end(args); 00110 } 00111 00112 00113 /** @class DisabledException 00114 * The requested feature is disabled. 00115 */ 00116 00117 /** Constructor. 00118 * @param format format of explanatory message of the error, format 00119 * and parameters similar to sprintf. 00120 */ 00121 DisabledException::DisabledException(const char *format, ...) 00122 : TransformException() 00123 { 00124 va_list args; 00125 va_start(args, format); 00126 append_nolock_va(format, args); 00127 va_end(args); 00128 } 00129 00130 00131 } // end namespace tf 00132 } // end namespace fawkes