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 
26 // STD/STL
27 #include <map>
28 #include <string>
29 #include <vector>
30 
31 // ArmarX
34 
36 {
37  /**
38  * @brief A base class for skill exceptions. All skill exceptions inherit from this class
39  */
40  class SkillException : public armarx::LocalException
41  {
42  public:
43  SkillException() = delete;
44 
45  SkillException(const std::string& prettymethod, const std::string& reason) :
46  LocalException(prettymethod + ": " + reason + ".")
47  {
48  }
49  };
50 
51  /**
52  * @brief Indicates that a skill was not found, e.g., by the skill manager.
53  */
55  {
56  public:
57  SkillNotFoundException() = delete;
58 
59  SkillNotFoundException(const std::string& prettymethod, const std::string& reason) :
60  SkillException(prettymethod, reason)
61  {
62  }
63  };
64 
66  {
67  public:
68  SkillAbortedException() = delete;
69 
70  SkillAbortedException(const std::string& prettymethod, const std::string& reason) :
71  SkillException(prettymethod, reason)
72  {
73  }
74  };
75 
77  {
78  public:
79  SkillFailedException() = delete;
80 
81  SkillFailedException(const std::string& prettymethod, const std::string& reason) :
82  SkillException(prettymethod, reason)
83  {
84  }
85  };
86 
87  /**
88  * @brief The NotImplementedYetException class
89  */
91  {
92  public:
93  NotImplementedYetException() = delete;
94 
95  NotImplementedYetException(const std::string& prettymethod) :
96  SkillException(prettymethod, "This method is not yet implemented!")
97  {
98  }
99  };
100 } // namespace armarx::skills::error
armarx::skills::error::SkillFailedException::SkillFailedException
SkillFailedException()=delete
armarx::skills::error::SkillNotFoundException::SkillNotFoundException
SkillNotFoundException(const std::string &prettymethod, const std::string &reason)
Definition: Exception.h:59
armarx::skills::error::SkillAbortedException::SkillAbortedException
SkillAbortedException()=delete
armarx::skills::error
Definition: Exception.h:35
armarx::skills::error::SkillNotFoundException::SkillNotFoundException
SkillNotFoundException()=delete
armarx::skills::error::SkillException::SkillException
SkillException()=delete
armarx::skills::error::SkillAbortedException::SkillAbortedException
SkillAbortedException(const std::string &prettymethod, const std::string &reason)
Definition: Exception.h:70
armarx::skills::error::SkillAbortedException
Definition: Exception.h:65
armarx::skills::error::SkillNotFoundException
Indicates that a skill was not found, e.g., by the skill manager.
Definition: Exception.h:54
armarx::skills::error::NotImplementedYetException::NotImplementedYetException
NotImplementedYetException(const std::string &prettymethod)
Definition: Exception.h:95
armarx::skills::error::SkillFailedException
Definition: Exception.h:76
armarx::skills::error::SkillFailedException::SkillFailedException
SkillFailedException(const std::string &prettymethod, const std::string &reason)
Definition: Exception.h:81
armarx::skills::error::NotImplementedYetException::NotImplementedYetException
NotImplementedYetException()=delete
armarx::skills::error::SkillException
A base class for skill exceptions.
Definition: Exception.h:40
ExpressionException.h
armarx::skills::error::NotImplementedYetException
The NotImplementedYetException class.
Definition: Exception.h:90
armarx::skills::error::SkillException::SkillException
SkillException(const std::string &prettymethod, const std::string &reason)
Definition: Exception.h:45
Exception.h