bpp-core  2.2.0
DataTableExceptions.h
Go to the documentation of this file.
1 //
2 // File: DataTableExceptions.h
3 // Created by: Julien Dutheil
4 // Created on: Tue Nov 2005 14:10
5 // from file DataTable.h
6 //
7 
8 /*
9 Copyright or © or Copr. Bio++ Development Team, (November 17, 2004)
10 
11 This software is a computer program whose purpose is to provide classes
12 for numerical calculus.
13 
14 This software is governed by the CeCILL license under French law and
15 abiding by the rules of distribution of free software. You can use,
16 modify and/ or redistribute the software under the terms of the CeCILL
17 license as circulated by CEA, CNRS and INRIA at the following URL
18 "http://www.cecill.info".
19 
20 As a counterpart to the access to the source code and rights to copy,
21 modify and redistribute granted by the license, users are provided only
22 with a limited warranty and the software's author, the holder of the
23 economic rights, and the successive licensors have only limited
24 liability.
25 
26 In this respect, the user's attention is drawn to the risks associated
27 with loading, using, modifying and/or developing or reproducing the
28 software by the user in light of its specific status of free software,
29 that may mean that it is complicated to manipulate, and that also
30 therefore means that it is reserved for developers and experienced
31 professionals having in-depth computer knowledge. Users are therefore
32 encouraged to load and test the software's suitability as regards their
33 requirements in conditions enabling the security of their systems and/or
34 data to be ensured and, more generally, to use and operate it in the
35 same conditions as regards security.
36 
37 The fact that you are presently reading this means that you have had
38 knowledge of the CeCILL license and that you accept its terms.
39 */
40 
41 #ifndef _DataTableExceptions_H_
42 #define _DataTableExceptions_H_
43 
44 //#include "VectorTools.h"
45 
46 // From Utils:
47 #include "../Exceptions.h"
48 #include "../Text/TextTools.h"
49 
50 // From the STL:
51 #include <string>
52 
53 namespace bpp
54 {
55 
60  public Exception
61 {
62  protected:
63  std::string _name;
64 
65  public:
66  TableNameNotFoundException(const std::string & text, const std::string & name) :
67  Exception("TableNameNotFoundException: " + name + ". " + text), _name(name) {}
68  virtual ~TableNameNotFoundException() throw() {}
69 
70  public:
71  std::string getName() const { return _name; }
72 };
73 
79 {
80  public:
81  TableRowNameNotFoundException(const std::string & text, const std::string & name) :
82  TableNameNotFoundException("TableRowNameNotFoundException: " + name + ". " + text, name) {}
83  virtual ~TableRowNameNotFoundException() throw() {}
84 };
85 
91 {
92  public:
93  TableColumnNameNotFoundException(const std::string & text, const std::string & name) :
94  TableNameNotFoundException("TableColumnNameNotFoundException: " + name + ". " + text, name) {}
95  virtual ~TableColumnNameNotFoundException() throw() {}
96 };
97 
103  public Exception
104 {
105  public:
106  NoTableRowNamesException(const std::string & text) :
107  Exception("NoTableRowNamesException: "+text) {}
108  virtual ~NoTableRowNamesException() throw() {}
109 };
110 
116  public Exception
117 {
118  public:
119  NoTableColumnNamesException(const std::string & text) :
120  Exception("NoTableColumnNamesException: "+text) {}
121  virtual ~NoTableColumnNamesException() throw() {}
122 };
123 
128  public Exception
129 {
130  public:
131  TableRowNamesException(const std::string & text) :
132  Exception("TableRowNamesException: "+text) {}
133  virtual ~TableRowNamesException() throw() {}
134 };
135 
140  public Exception
141 {
142  public:
143  TableColumnNamesException(const std::string & text) :
144  Exception("TableColumnNamesException: "+text) {}
145  virtual ~TableColumnNamesException() throw() {}
146 };
147 
152  public Exception
153 {
154  public:
155  DuplicatedTableRowNameException(const std::string & text) :
156  Exception("DuplicatedTableRowNameException: "+text) {}
157  virtual ~DuplicatedTableRowNameException() throw() {}
158 };
159 
164  public Exception
165 {
166  public:
167  DuplicatedTableColumnNameException(const std::string & text) :
168  Exception("DuplicatedTableColumnNameException: "+text) {}
170 };
171 
172 } //end of namespace bpp.
173 
174 #endif //_DataTableExceptions_H_
175 
TableRowNameNotFoundException(const std::string &text, const std::string &name)
NoTableRowNamesException(const std::string &text)
This class allows to perform a correspondence analysis.
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.
Definition: Exceptions.h:57
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.