Tapkee
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
tapkee/exceptions.hpp
Go to the documentation of this file.
1 /* This software is distributed under BSD 3-clause license (see LICENSE file).
2  *
3  * Copyright (c) 2012-2013 Sergey Lisitsyn
4  */
5 
6 #ifndef TAPKEE_EXCEPTIONS_H_
7 #define TAPKEE_EXCEPTIONS_H_
8 
9 #include <stdexcept>
10 #include <string>
11 
12 namespace tapkee
13 {
14 
17 class no_data_error : public std::logic_error
18 {
19  public:
21  explicit no_data_error() :
22  std::logic_error("No data to embed") {};
23 };
24 
27 class unsupported_method_error : public std::logic_error
28 {
29  public:
31  explicit unsupported_method_error(const std::string& what_msg) :
32  std::logic_error(what_msg) {};
33 };
34 
37 class not_enough_memory_error : public std::runtime_error
38 {
39  public:
41  explicit not_enough_memory_error(const std::string& what_msg) :
42  std::runtime_error(what_msg) {};
43 };
44 
47 class cancelled_exception : public std::exception
48 {
49  public:
50  explicit cancelled_exception() :
51  std::exception() {};
52 };
53 
56 class eigendecomposition_error : public std::runtime_error
57 {
58  public:
60  explicit eigendecomposition_error(const std::string& what_msg) :
61  std::runtime_error(what_msg) {};
62 };
63 
66 class missed_parameter_error : public std::logic_error
67 {
68  public:
70  explicit missed_parameter_error(const std::string& what_msg) :
71  std::logic_error(what_msg) {};
72 };
73 
76 class wrong_parameter_error : public std::logic_error
77 {
78  public:
80  explicit wrong_parameter_error(const std::string& what_msg) :
81  std::logic_error(what_msg) {};
82 };
83 
86 class wrong_parameter_type_error : public std::logic_error
87 {
88  public:
90  explicit wrong_parameter_type_error(const std::string& what_msg) :
91  std::logic_error(what_msg) {};
92 };
93 
95 class multiple_parameter_error : public std::runtime_error
96 {
97  public:
99  explicit multiple_parameter_error(const std::string& what_msg) :
100  std::runtime_error(what_msg) {};
101 };
102 
103 }
104 #endif
105 
An exception type that is thrown in case if wrong parameter value is passed.
An exception type that is thrown when the library can&#39;t get enough memory.
wrong_parameter_type_error(const std::string &what_msg)
wrong_parameter_error(const std::string &what_msg)
An exception type that is thrown in case of missed parameter, i.e. when some required parameter is no...
An exception type that is thrown when no data is given.
eigendecomposition_error(const std::string &what_msg)
An exception type that is thrown when eigendecomposition is failed.
An exception type that is thrown when computations were cancelled.
An exception type that is thrown when some parameter is passed more than once.
unsupported_method_error(const std::string &what_msg)
An exception type that is thrown in case if wrong parameter value is passed.
multiple_parameter_error(const std::string &what_msg)
not_enough_memory_error(const std::string &what_msg)
An exception type that is thrown when unsupported method is called.
missed_parameter_error(const std::string &what_msg)