Orocos Real-Time Toolkit  2.8.3
FactoryExceptions.hpp
Go to the documentation of this file.
1 /***************************************************************************
2  tag: Peter Soetens Mon Jan 19 14:11:25 CET 2004 FactoryExceptions.hpp
3 
4  FactoryExceptions.hpp - description
5  -------------------
6  begin : Mon January 19 2004
7  copyright : (C) 2004 Peter Soetens
8  email : peter.soetens@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 General Public *
13  * License as published by the Free Software Foundation; *
14  * version 2 of the License. *
15  * *
16  * As a special exception, you may use this file as part of a free *
17  * software library without restriction. Specifically, if other files *
18  * instantiate templates or use macros or inline functions from this *
19  * file, or you compile this file and link it with other files to *
20  * produce an executable, this file does not by itself cause the *
21  * resulting executable to be covered by the GNU General Public *
22  * License. This exception does not however invalidate any other *
23  * reasons why the executable file might be covered by the GNU General *
24  * Public License. *
25  * *
26  * This library is distributed in the hope that it will be useful, *
27  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
28  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
29  * Lesser General Public License for more details. *
30  * *
31  * You should have received a copy of the GNU General Public *
32  * License along with this library; if not, write to the Free Software *
33  * Foundation, Inc., 59 Temple Place, *
34  * Suite 330, Boston, MA 02111-1307 USA *
35  * *
36  ***************************************************************************/
37 
38 #ifndef FACTORYEXCEPTIONS_HPP
39 #define FACTORYEXCEPTIONS_HPP
40 
41 #include <string>
42 #include <exception>
43 #include "rtt-config.h"
44 
49 namespace RTT
50 {
56  : public std::exception
57  {
58  name_not_found_exception( const std::string& n="name" );
59  ~name_not_found_exception() throw();
60  std::string name;
61  std::string whatstr;
62  virtual const char* what() const throw();
63  };
64 
70  : public std::exception
71  {
73  ~invalid_handle_exception() throw();
74  std::string whatstr;
75  virtual const char* what() const throw();
76  };
77 
83  : public std::exception
84  {
85  int wanted;
86  int received;
87  std::string whatstr;
88  wrong_number_of_args_exception( int w, int r );
90  virtual const char* what() const throw();
91  };
92 
98  : public std::exception
99  {
100  // this contains the number of the argument that had the wrong
101  // type. The first argument has number 1.
102  int whicharg;
103  std::string expected_;
104  std::string received_;
105  std::string whatstr;
106  wrong_types_of_args_exception( int w, const std::string& expected, const std::string& received );
108  virtual const char* what() const throw();
109  };
110 
116  : public std::exception
117  {
118  std::string whatstr;
119  no_asynchronous_operation_exception( const std::string& what );
121  virtual const char* what() const throw();
122  };
123 
131  : public std::exception
132  {
133  // thrown when a factory expects an AssignableDataSource (lvalue), but only
134  // found a DataSource (rvalue).
135  int whicharg;
136  std::string received_;
137  std::string whatstr;
138  non_lvalue_args_exception( int w, const std::string& received );
139  ~non_lvalue_args_exception() throw();
140  virtual const char* what() const throw();
141  };
142 }
143 
144 #endif
#define RTT_EXPORT
Definition: rtt-config.h:98
Exception thrown when a factory is requested to create an object, and one of the arguments needed to ...
Exception thrown when a factory is requested to create an object with an unknown name.
STL namespace.
Exception thrown when a factory is requested to create an object with an invalid SendHandle.
Exception thrown when a factory is requested to create an object, but a wrong argument type was given...
Exception thrown when a factory is requested to create an object but the wrong number of arguments wa...
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
Definition: Activity.cpp:51
Exception thrown when a factory is requested to produce an asynchronous object while it is not availa...