Tapkee
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
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 wrong_parameter_error : public std::logic_error
18 {
19  public:
21  explicit wrong_parameter_error(const std::string& what_msg) :
22  std::logic_error(what_msg) {};
23 };
24 
27 class wrong_parameter_type_error : public std::logic_error
28 {
29  public:
31  explicit wrong_parameter_type_error(const std::string& what_msg) :
32  std::logic_error(what_msg) {};
33 };
34 
37 class missed_parameter_error : public std::logic_error
38 {
39  public:
41  explicit missed_parameter_error(const std::string& what_msg) :
42  std::logic_error(what_msg) {};
43 };
44 
47 class unsupported_method_error : public std::logic_error
48 {
49  public:
51  explicit unsupported_method_error(const std::string& what_msg) :
52  std::logic_error(what_msg) {};
53 };
54 
57 class not_enough_memory_error : public std::runtime_error
58 {
59  public:
61  explicit not_enough_memory_error(const std::string& what_msg) :
62  std::runtime_error(what_msg) {};
63 };
64 
66 class multiple_parameter_error : public std::runtime_error
67 {
68  public:
70  explicit multiple_parameter_error(const std::string& what_msg) :
71  std::runtime_error(what_msg) {};
72 };
73 
76 class cancelled_exception : public std::exception
77 {
78  public:
79  explicit cancelled_exception() :
80  std::exception() {};
81 };
82 
85 class eigendecomposition_error : public std::runtime_error
86 {
87  public:
89  explicit eigendecomposition_error(const std::string& what_msg) :
90  std::runtime_error(what_msg) {};
91 };
92 
93 }
94 #endif
95 
An exception type that is thrown in case if wrong parameter value is passed.
Definition: exceptions.hpp:17
An exception type that is thrown when the library can&#39;t get enough memory.
Definition: exceptions.hpp:57
wrong_parameter_type_error(const std::string &what_msg)
Definition: exceptions.hpp:31
wrong_parameter_error(const std::string &what_msg)
Definition: exceptions.hpp:21
An exception type that is thrown in case of missed parameter, i.e. when some required parameter is no...
Definition: exceptions.hpp:37
eigendecomposition_error(const std::string &what_msg)
Definition: exceptions.hpp:89
An exception type that is thrown when eigendecomposition is failed.
Definition: exceptions.hpp:85
An exception type that is thrown when computations were cancelled.
Definition: exceptions.hpp:76
An exception type that is thrown when some parameter is passed more than once.
Definition: exceptions.hpp:66
unsupported_method_error(const std::string &what_msg)
Definition: exceptions.hpp:51
An exception type that is thrown in case if wrong parameter value is passed.
Definition: exceptions.hpp:27
multiple_parameter_error(const std::string &what_msg)
Definition: exceptions.hpp:70
not_enough_memory_error(const std::string &what_msg)
Definition: exceptions.hpp:61
An exception type that is thrown when unsupported method is called.
Definition: exceptions.hpp:47
missed_parameter_error(const std::string &what_msg)
Definition: exceptions.hpp:41