Exception.h
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * Copyright (C) 2012-2016, High Performance Humanoid Technologies (H2T),
5  * Karlsruhe Institute of Technology (KIT), all rights reserved.
6  *
7  * ArmarX is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License version 2 as
9  * published by the Free Software Foundation.
10  *
11  * ArmarX is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  *
19  * @author Fabian Peller-Konrad (fabian dot peller-konrad at kit dot edu)
20  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
21  * GNU General Public License
22  */
23 
24 #pragma once
25 
27 
28 #include <RobotAPI/interface/aron/Aron.h>
30 
32 {
33  /**
34  * @brief A base class for aron exceptions. All aron exceptions inherit from this class
35  */
36  class AronException : public armarx::LocalException
37  {
38  public:
39  AronException() = delete;
40 
41  AronException(const std::string& prettymethod, const std::string& reason);
42 
43  AronException(const std::string& prettymethod, const std::string& reason, const Path& path);
44 
45  /// call operator to append a message to the exception. Used by ARMARX_CHECK_AND_THROW
46  AronException& operator()(const std::string& additionalMessage = "");
47  };
48 
50  {
51  public:
52  AronEOFException() = delete;
53 
54  AronEOFException(const std::string& prettymethod);
55  };
56 
57  /**
58  * @brief The NotImplementedYetException class
59  */
61  {
62  public:
63  NotImplementedYetException() = delete;
64 
65  NotImplementedYetException(const std::string& prettymethod);
66  };
67 
68  /**
69  * @brief The AronNotValidException class. Takes a dto object as input
70  */
72  {
73  public:
74  AronNotValidException() = delete;
75 
76  AronNotValidException(const std::string& prettymethod,
77  const std::string& reason,
78  const data::dto::GenericDataPtr& data);
79 
80  AronNotValidException(const std::string& prettymethod,
81  const std::string& reason,
82  const data::dto::GenericDataPtr& data,
83  const Path& path);
84 
85  AronNotValidException(const std::string& prettymethod,
86  const std::string& reason,
87  const type::dto::GenericTypePtr& type);
88 
89  AronNotValidException(const std::string& prettymethod,
90  const std::string& reason,
91  const type::dto::GenericTypePtr& type,
92  const Path& path);
93  };
94 
95  /**
96  * @brief The ValueNotValidException class. Only takes strings as input (convert before)
97  */
99  {
100  public:
101  ValueNotValidException() = delete;
102 
103  ValueNotValidException(const std::string& prettymethod,
104  const std::string& reason,
105  const std::string& input);
106 
107  ValueNotValidException(const std::string& prettymethod,
108  const std::string& reason,
109  const std::string& input,
110  const Path& path);
111 
112  ValueNotValidException(const std::string& prettymethod,
113  const std::string& reason,
114  const std::string& input,
115  const std::string& expectation);
116 
117  ValueNotValidException(const std::string& prettymethod,
118  const std::string& reason,
119  const std::string& input,
120  const std::string& expectation,
121  const Path& path);
122  };
123 } // namespace armarx::aron::error
armarx::aron::error::AronException
A base class for aron exceptions.
Definition: Exception.h:36
LocalException.h
armarx::aron::error
Definition: Exception.h:31
Path.h
armarx::aron::error::AronException::AronException
AronException()=delete
armarx::aron::error::ValueNotValidException::ValueNotValidException
ValueNotValidException()=delete
armarx::aron::error::AronNotValidException::AronNotValidException
AronNotValidException()=delete
armarx::aron::error::NotImplementedYetException
The NotImplementedYetException class.
Definition: Exception.h:60
armarx::aron::Path
The Path class.
Definition: Path.h:35
armarx::aron::error::ValueNotValidException
The ValueNotValidException class.
Definition: Exception.h:98
armarx::aron::error::AronEOFException
Definition: Exception.h:49
data
uint8_t data[1]
Definition: EtherCATFrame.h:68
armarx::aron::input
ReaderT::InputType & input
Definition: rw.h:12
armarx::aron::error::AronNotValidException
The AronNotValidException class.
Definition: Exception.h:71
armarx::aron::error::AronEOFException::AronEOFException
AronEOFException()=delete
armarx::aron::error::AronException::operator()
AronException & operator()(const std::string &additionalMessage="")
call operator to append a message to the exception. Used by ARMARX_CHECK_AND_THROW
Definition: Exception.cpp:40
armarx::aron::error::NotImplementedYetException::NotImplementedYetException
NotImplementedYetException()=delete