error.h
Go to the documentation of this file.
1 /***************************************************************************
2  tag: Erwin Aertbelien Mon Jan 10 16:38:38 CET 2005 error.h
3 
4  error.h - description
5  -------------------
6  begin : Mon January 10 2005
7  copyright : (C) 2005 Erwin Aertbelien
8  email : erwin.aertbelien@mech.kuleuven.ac.be
9 
10  ***************************************************************************
11  * This library is free software; you can redistribute it and/or *
12  * modify it under the terms of the GNU Lesser General Public *
13  * License as published by the Free Software Foundation; either *
14  * version 2.1 of the License, or (at your option) any later version. *
15  * *
16  * This library 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 GNU *
19  * Lesser General Public License for more details. *
20  * *
21  * You should have received a copy of the GNU Lesser General Public *
22  * License along with this library; if not, write to the Free Software *
23  * Foundation, Inc., 59 Temple Place, *
24  * Suite 330, Boston, MA 02111-1307 USA *
25  * *
26  ***************************************************************************/
27 
28 
29 /*****************************************************************************
30  * \file
31  * Defines the exception classes that can be thrown
32  * \author
33  * Erwin Aertbelien, Div. PMA, Dep. of Mech. Eng., K.U.Leuven
34  *
35  * \version
36  * ORO_Geometry V0.2
37  *
38  * \par History
39  * - $log$
40  *
41  * \par Release
42  * $Id: error.h,v 1.1.1.1.2.2 2003/04/04 15:39:43 pissaris Exp $
43  * $Name: $
44  ****************************************************************************/
45 #ifndef ERROR_H_84822 // to make it unique, a random number
46 #define ERROR_H_84822
47 
48 #include "utility.h"
49 #include <string.h>
50 #include <string>
51 namespace KDL {
52 
56 class Error {
57 public:
62  virtual ~Error() {}
63  virtual const char* Description() const {return "Unspecified Error\n";}
64 
65  virtual int GetType() const {return 0;}
66 };
67 
68 
69 class Error_IO : public Error {
70  std::string msg;
71  int typenr;
72 public:
73  Error_IO(const std::string& _msg="Unspecified I/O Error",int typenr=0):msg(_msg) {}
74  virtual const char* Description() const {return msg.c_str();}
75  virtual int GetType() const {return typenr;}
76 };
77 class Error_BasicIO : public Error_IO {};
79 public:
80  virtual const char* Description() const {return "Error while reading stream";}
81  virtual int GetType() const {return 1;}
82 };
84 public:
85  virtual const char* Description() const {return "Expected Delimiter not encountered";}
86  virtual int GetType() const {return 2;}
87 };
89 public:
90  virtual const char* Description() const {return "Expected space,tab or newline not encountered";}
91  virtual int GetType() const {return 3;}
92 };
94 public:
95  virtual const char* Description() const {return "Unexpected character";}
96  virtual int GetType() const {return 4;}
97 };
98 
100 public:
101  virtual const char* Description() const {return "Word that is read out of stream is bigger than maxsize";}
102  virtual int GetType() const {return 5;}
103 };
104 
106 public:
107  virtual const char* Description() const {return "File cannot be opened";}
108  virtual int GetType() const {return 6;}
109 };
110 class Error_FrameIO : public Error_IO {};
112 public:
113  virtual const char* Description() const {return "Unexpected identifier, expecting a vector (explicit or ZERO)";}
114  virtual int GetType() const {return 101;}
115 };
117 public:
118  virtual const char* Description() const {return "Unexpected identifier, expecting a Frame (explicit or DH)";}
119  virtual int GetType() const {return 102;}
120 };
122 public:
123  virtual const char* Description() const {return "Unexpected identifier, expecting a Rotation (explicit or EULERZYX, EULERZYZ, RPY,ROT,IDENTITY)";}
124  virtual int GetType() const {return 103;}
125 };
126 class Error_ChainIO : public Error {};
128 public:
129  virtual const char* Description() const {return "Unexpected identifier, expecting TRANS or ROT";}
130  virtual int GetType() const {return 201;}
131 };
133 class Error_RedundancyIO:public Error_IO {};
135 public:
136  virtual const char* Description() const {return "Illegal Resolutiontype is used in I/O with ResolutionTask";}
137  virtual int GetType() const {return 301;}
138 };
139 class Error_Redundancy:public Error {};
141 public:
142  virtual const char* Description() const {return "Joint limits cannot be avoided";}
143  virtual int GetType() const {return 1002;}
144 };
146 public:
147  virtual const char* Description() const {return "Manipulability is very low";}
148  virtual int GetType() const {return 1003;}
149 };
150 class Error_MotionIO : public Error {};
152 public:
153  virtual const char* Description() const { return "Wrong keyword while reading motion profile";}
154  virtual int GetType() const {return 2001;}
155 };
157 public:
158  virtual const char* Description() const { return "Trajectory type keyword not known";}
159  virtual int GetType() const {return 2002;}
160 };
161 
162 class Error_MotionPlanning : public Error {};
163 
165 public:
166  virtual const char* Description() const { return "Circle : radius is to small";}
167  virtual int GetType() const {return 3001;}
168 };
169 
171 public:
172  virtual const char* Description() const { return "Circle : Plane for motion is not properly defined";}
173  virtual int GetType() const {return 3002;}
174 };
175 
177 public:
178  virtual const char* Description() const { return "Acceleration of a rectangular velocityprofile cannot be used";}
179  virtual int GetType() const {return 3003;}
180 };
181 
183  int reason;
184 public:
185  Error_MotionPlanning_Not_Feasible(int _reason):reason(_reason) {}
186  virtual const char* Description() const {
187  return "Motion Profile with requested parameters is not feasible";
188  }
189  virtual int GetType() const {return 3100+reason;}
190 };
191 
193 public:
194  virtual const char* Description() const { return "Method is not applicable for this derived object";}
195  virtual int GetType() const {return 3004;}
196 };
198 class Error_Integrator : public Error {};
199 
202 public:
203  virtual const char* Description() const { return "Stepsize Underflow";}
204  virtual int GetType() const {return 4001;}
205 };
206 
210 public:
211  virtual const char* Description() const { return "To many steps"; }
212  virtual int GetType() const {return 4002;}
213 };
214 
217 public:
218  virtual const char* Description() const { return "Stepsize to small"; }
219  virtual int GetType() const {return 4003;}
220 };
221 
222 class Error_Criterium : public Error {};
223 
225 public:
226  virtual const char* Description() const { return "Unexpected identifier while reading a criterium"; }
227  virtual int GetType() const {return 5001;}
228 };
229 
230 class Error_Limits : public Error {};
231 
233 public:
234  virtual const char* Description() const { return "Unexpected identifier while reading a jointlimits"; }
235  virtual int GetType() const {return 6001;}
236 };
237 
238 
240 public:
241  virtual const char* Description() const { return "The requested object/method/function is not implemented"; }
242  virtual int GetType() const {return 7000;}
243 };
244 
245 
246 
247 }
248 
249 #endif
int typenr
Definition: error.h:71
virtual const char * Description() const
Definition: error.h:90
Abstract subclass of all errors that can be thrown by Adaptive_Integrator.
Definition: error.h:198
virtual const char * Description() const
Definition: error.h:166
virtual const char * Description() const
Definition: error.h:194
virtual const char * Description() const
Definition: error.h:153
std::string msg
Definition: error.h:70
virtual const char * Description() const
Definition: error.h:172
virtual int GetType() const
Definition: error.h:212
virtual const char * Description() const
Definition: error.h:142
Error_MotionPlanning_Not_Feasible(int _reason)
Definition: error.h:185
virtual int GetType() const
Definition: error.h:96
virtual const char * Description() const
Definition: error.h:113
virtual const char * Description() const
Definition: error.h:101
virtual const char * Description() const
Definition: error.h:95
virtual const char * Description() const
Definition: error.h:74
virtual const char * Description() const
Definition: error.h:129
virtual const char * Description() const
Definition: error.h:123
virtual int GetType() const
Definition: error.h:81
virtual int GetType() const
Definition: error.h:189
virtual const char * Description() const
Definition: error.h:234
virtual int GetType() const
Definition: error.h:108
virtual const char * Description() const
Definition: error.h:178
virtual const char * Description() const
Definition: error.h:158
virtual const char * Description() const
Definition: error.h:136
virtual int GetType() const
Definition: error.h:159
virtual int GetType() const
Definition: error.h:86
virtual const char * Description() const
Definition: error.h:218
virtual int GetType() const
Definition: error.h:242
virtual int GetType() const
Definition: error.h:154
virtual const char * Description() const
Definition: error.h:241
virtual const char * Description() const
Definition: error.h:211
virtual int GetType() const
Definition: error.h:235
virtual const char * Description() const
Definition: error.h:85
virtual const char * Description() const
Definition: error.h:203
virtual const char * Description() const
Definition: error.h:107
virtual const char * Description() const
Definition: error.h:226
virtual int GetType() const
Definition: error.h:204
virtual int GetType() const
Definition: error.h:119
virtual int GetType() const
Definition: error.h:219
virtual int GetType() const
Definition: error.h:91
virtual const char * Description() const
Definition: error.h:147
virtual const char * Description() const
Definition: error.h:63
Error_Stepsize_To_Small is thrown if the stepsize becomes to small.
Definition: error.h:216
virtual int GetType() const
Definition: error.h:75
virtual const char * Description() const
Definition: error.h:186
virtual int GetType() const
Definition: error.h:148
virtual int GetType() const
Definition: error.h:179
virtual const char * Description() const
Definition: error.h:118
Error_IO(const std::string &_msg="Unspecified I/O Error", int typenr=0)
Definition: error.h:73
Error_Redundancy indicates an error that occurred during solving for redundancy.
Definition: error.h:133
Error_Stepsize_Underflow is thrown if the stepsize becomes to small.
Definition: error.h:201
virtual int GetType() const
Definition: error.h:227
virtual int GetType() const
Definition: error.h:130
virtual const char * Description() const
Definition: error.h:80
virtual int GetType() const
Definition: error.h:65
virtual ~Error()
Definition: error.h:62
virtual int GetType() const
Definition: error.h:114
virtual int GetType() const
Definition: error.h:143
virtual int GetType() const
Definition: error.h:102


orocos_kdl
Author(s):
autogenerated on Thu Apr 13 2023 02:19:14