bpp-core3  3.0.0
TableExceptions.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: The Bio++ Development Group
2 //
3 // SPDX-License-Identifier: CECILL-2.1
4 
5 #ifndef BPP_NUMERIC_TABLEEXCEPTIONS_H
6 #define BPP_NUMERIC_TABLEEXCEPTIONS_H
7 
8 
9 // #include "VectorTools.h"
10 
11 // From Utils:
12 #include "../Exceptions.h"
13 #include "../Text/TextTools.h"
14 
15 // From the STL:
16 #include <string>
17 
18 namespace bpp
19 {
24  public Exception
25 {
26 protected:
27  std::string _name;
28 
29 public:
30  TableNameNotFoundException(const std::string& text, const std::string& name) :
31  Exception("TableNameNotFoundException: " + name + ". " + text), _name(name) {}
33 
34 public:
35  std::string getName() const { return _name; }
36 };
37 
43 {
44 public:
45  TableRowNameNotFoundException(const std::string& text, const std::string& name) :
46  TableNameNotFoundException("TableRowNameNotFoundException: " + name + ". " + text, name) {}
48 };
49 
55 {
56 public:
57  TableColumnNameNotFoundException(const std::string& text, const std::string& name) :
58  TableNameNotFoundException("TableColumnNameNotFoundException: " + name + ". " + text, name) {}
60 };
61 
67  public Exception
68 {
69 public:
70  NoTableRowNamesException(const std::string& text) :
71  Exception("NoTableRowNamesException: " + text) {}
73 };
74 
80  public Exception
81 {
82 public:
83  NoTableColumnNamesException(const std::string& text) :
84  Exception("NoTableColumnNamesException: " + text) {}
86 };
87 
92  public Exception
93 {
94 public:
95  TableRowNamesException(const std::string& text) :
96  Exception("TableRowNamesException: " + text) {}
98 };
99 
104  public Exception
105 {
106 public:
107  TableColumnNamesException(const std::string& text) :
108  Exception("TableColumnNamesException: " + text) {}
110 };
111 
116  public Exception
117 {
118 public:
119  DuplicatedTableRowNameException(const std::string& text) :
120  Exception("DuplicatedTableRowNameException: " + text) {}
122 };
123 
128  public Exception
129 {
130 public:
131  DuplicatedTableColumnNameException(const std::string& text) :
132  Exception("DuplicatedTableColumnNameException: " + text) {}
134 };
135 } // end of namespace bpp.
136 #endif // BPP_NUMERIC_TABLEEXCEPTIONS_H
TableRowNameNotFoundException(const std::string &text, const std::string &name)
NoTableRowNamesException(const std::string &text)
NoTableColumnNamesException(const std::string &text)
TableNameNotFoundException(const std::string &text, const std::string &name)
DuplicatedTableRowNameException(const std::string &text)
Exception thrown when a given column name is not found is a DataTable object.
Exception thrown when attempting to duplicate a row name.
Exception thrown when trying to retrieve a row by its name and no row names have been specified...
TableRowNamesException(const std::string &text)
DuplicatedTableColumnNameException(const std::string &text)
Exception thrown when a given row name is not found is a DataTable object.
Excpetion thrown when attempting to duplicate a column name.
Exception thrown when trying to retrieve a column by its name and no column names have been specified...
TableColumnNamesException(const std::string &text)
Exception base class. Overload exception constructor (to control the exceptions mechanism). Destructor is already virtual (from std::exception)
Definition: Exceptions.h:20
TableColumnNameNotFoundException(const std::string &text, const std::string &name)
Exception thrown when a given name is not found is a DataTable object.
General exception class dealing with column names.
General exception class dealing with row names.