Exceptions.cpp
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright (C) 2014 by Ralf Kaestner *
3  * ralf.kaestner@gmail.com *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the Lesser GNU General Public License as published by*
7  * the Free Software Foundation; either version 3 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * Lesser GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the Lesser GNU General Public License *
16  * along with this program. If not, see <http://www.gnu.org/licenses/>. *
17  ******************************************************************************/
18 
19 #include <boost/lexical_cast.hpp>
20 
22 
23 namespace variant_topic_tools {
24 
25 /*****************************************************************************/
26 /* Constructors and Destructor */
27 /*****************************************************************************/
28 
30  ros::Exception("Attempted null pointer operation") {
31 }
32 
34  ros::Exception("Attempted execution of an invalid operation: "+what) {
35 }
36 
38  ros::Exception("Attempted use of an invalid data type") {
39 }
40 
42  ros::Exception("Attempted modification of an immutable data type") {
43 }
44 
46  identifier) :
47  ros::Exception("Data type ["+identifier+"] does not exist") {
48 }
49 
51  const std::string& identifier) :
52  ros::Exception("Data type identifier ["+identifier+
53  "] is used ambiguously") {
54 }
55 
57  expectedDataType, const std::string& providedDataType) :
58  ros::Exception("Provided data type ["+providedDataType+
59  "] mismatches expected data type ["+expectedDataType+"]") {
60 }
61 
63  const std::string& name) :
64  ros::Exception("Member name ["+name+"] is used ambiguously") {
65 }
66 
68  ros::Exception("Member with index ["+boost::lexical_cast<std::string>(index)+
69  "] does not exist") {
70 }
71 
73  ros::Exception("Member with name ["+name+"] does not exist") {
74 }
75 
77  ros::Exception("Attempted use of an invalid message member") {
78 }
79 
81  expectedMD5Sum, const std::string& providedMD5Sum) :
82  ros::Exception("Provided MD5 sum ["+providedMD5Sum+
83  "] mismatches expected MD5 sum ["+expectedMD5Sum+"]") {
84 }
85 
87  invalidMessageType) :
88  ros::Exception("Message type ["+invalidMessageType+"] is invalid") {
89 }
90 
92  expectedMessageType, const std::string& providedMessageType) :
93  ros::Exception("Provided message type ["+providedMessageType+
94  "] mismatches expected message type ["+expectedMessageType+"]") {
95 }
96 
98  dataType, const std::string& line, const std::string& what) :
99  ros::Exception("Error parsing the definition for ["+dataType+"]: "+
100  what+"\n"+line) {
101 }
102 
104  package) :
105  ros::Exception("Package ["+package+"] not found") {
106 }
107 
108 FileOpenException::FileOpenException(const std::string& filename) :
109  ros::Exception("Error opening file ["+filename+"]") {
110 }
111 
113  ros::Exception("Attempted use of an invalid serializer") {
114 }
115 
116 }
PackageNotFoundException(const std::string &package)
Constructor.
Definition: Exceptions.cpp:103
InvalidMessageTypeException(const std::string &invalidMessageType)
Constructor.
Definition: Exceptions.cpp:86
FileOpenException(const std::string &filename)
Constructor.
Definition: Exceptions.cpp:108
NoSuchDataTypeException(const std::string &identifier)
Constructor.
Definition: Exceptions.cpp:45
MD5SumMismatchException(const std::string &expectedMD5Sum, const std::string &providedMD5Sum)
Constructor.
Definition: Exceptions.cpp:80
InvalidOperationException(const std::string &what)
Default constructor.
Definition: Exceptions.cpp:33
NullPointerException()
Default constructor.
Definition: Exceptions.cpp:29
AmbiguousMemberNameException(const std::string &name)
Constructor.
Definition: Exceptions.cpp:62
DefinitionParseException(const std::string &dataType, const std::string &line, const std::string &what)
Constructor.
Definition: Exceptions.cpp:97
Header file defining exceptions for the variant topic tools.
Exception(const std::string &what)
DataTypeMismatchException(const std::string &expectedDataType, const std::string &providedDataType)
Constructor.
Definition: Exceptions.cpp:56
NoSuchMemberException(int index)
Constructor (overloaded version taking a field index)
Definition: Exceptions.cpp:67
AmbiguousDataTypeIdentifierException(const std::string &identifier)
Constructor.
Definition: Exceptions.cpp:50
InvalidDataTypeException()
Default constructor.
Definition: Exceptions.cpp:37
MessageTypeMismatchException(const std::string &expectedMessageType, const std::string &providedMessageType)
Constructor.
Definition: Exceptions.cpp:91


variant_topic_tools
Author(s): Ralf Kaestner
autogenerated on Sat Jan 9 2021 03:56:49