casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DataManError.h
Go to the documentation of this file.
1 //# DataManError.h: Data manager error classes
2 //# Copyright (C) 1994,1995,1996,1999,2000,2003
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be addressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //# $Id$
27 
28 #ifndef TABLES_DATAMANERROR_H
29 #define TABLES_DATAMANERROR_H
30 
31 //# Includes
32 #include <casacore/casa/aips.h>
34 
35 namespace casacore { //# NAMESPACE CASACORE - BEGIN
36 
37 //# This header file defines the error classes used in the
38 //# data manager classes.
39 
40 
41 // <summary>
42 // Base error class for table data manager
43 // </summary>
44 // <use visibility=export>
45 // <reviewed reviewer="Gareth Hunt" date="94Nov17" tests="">
46 // </reviewed>
47 
48 // <synopsis>
49 // This is the generic data manager exception; catching this one means
50 // catching all DataMan* exceptions.
51 // Note that you have to catch AipsError to catch all possible exceptions.
52 // </synopsis>
53 
54 class DataManError : public AipsError {
55 public:
56  // The default constructor generates the message "Table DataManager error".
57  DataManError ();
58  // Construct with given message.
59  DataManError (const String& message);
60  ~DataManError () noexcept;
61 };
62 
63 
64 // <summary>
65 // Internal table data manager error
66 // </summary>
67 // <use visibility=export>
68 // <reviewed reviewer="Gareth Hunt" date="94Nov17" tests="">
69 // </reviewed>
70 
71 // <synopsis>
72 // Internal data manager error (should never be thrown).
73 // If this is thrown, something is terribly wrong.
74 // </synopsis>
75 
77 public:
78  // Add given message to string "Internal Table DataManager error: ".
80  ~DataManInternalError () noexcept;
81 };
82 
83 
84 // <summary>
85 // Table DataManager error; invalid data manager
86 // </summary>
87 // <use visibility=export>
88 // <reviewed reviewer="Gareth Hunt" date="94Nov17" tests="">
89 // </reviewed>
90 
91 // <synopsis>
92 // A data manager is unknown (i.e. not registered in DataManReg.cc).
93 // This means that the data manager object cannot be recreated.
94 // </synopsis>
95 
97 public:
98  // This constructor generates a message that a data manager
99  // with the given name is unknown (i.e. not registered).
100  DataManUnknownCtor (const String& columnName);
101  ~DataManUnknownCtor () noexcept;
102 };
103 
104 
105 // <summary>
106 // Table DataManager error; invalid data type
107 // </summary>
108 // <use visibility=export>
109 // <reviewed reviewer="Gareth Hunt" date="94Nov17" tests="">
110 // </reviewed>
111 
112 // <synopsis>
113 // Invalid data type used in the data manager.
114 // The data manager found an unknown data type when doing a get or put.
115 // In principle this error should never occur.
116 // </synopsis>
117 
118 class DataManInvDT : public DataManError {
119 public:
120  // The default constructor generates a generic "invalid data type" message.
121  DataManInvDT ();
122  // Put the name of the offending column in the "invalid data type" message.
123  DataManInvDT (const String& columnName);
124  ~DataManInvDT () noexcept;
125 };
126 
127 
128 
129 // <summary>
130 // Table DataManager error; invalid operation
131 // </summary>
132 // <use visibility=export>
133 // <reviewed reviewer="Gareth Hunt" date="94Nov17" tests="">
134 // </reviewed>
135 
136 // <synopsis>
137 // Invalid operation on a data manager.
138 // A request was done that the data manager could not handle.
139 // In principle the table system should already test on such operations
140 // and it should not bother the data manager with invalid requests.
141 // However, the data manager still tests them for safety.
142 // </synopsis>
143 
144 class DataManInvOper : public DataManError {
145 public:
146  // The default constructor generates a generic "invalid operation" message.
147  DataManInvOper ();
148  // Add given message to string "Invalid DataMan operation: ".
149  DataManInvOper (const String& message);
150  ~DataManInvOper () noexcept;
151 };
152 
153 
154 // <summary>
155 // Table DataManager error; unknown virtual column
156 // </summary>
157 // <use visibility=export>
158 // <reviewed reviewer="Gareth Hunt" date="94Nov17" tests="">
159 // </reviewed>
160 
161 // <synopsis>
162 // A column is unknown to the virtual column engine.
163 // This error is caused by binding a column to a virtual column engine
164 // which does not know the column name or data type.
165 // </synopsis>
166 
168 public:
169  // Issue a message containing the column name.
170  DataManUnknownVirtualColumn (const String& columnName,
171  const String& engineName);
172  ~DataManUnknownVirtualColumn () noexcept;
173 };
174 
175 
176 // <summary>
177 // Table DataManager error; error in TiledStMan
178 // </summary>
179 // <use visibility=export>
180 // <reviewed reviewer="Gareth Hunt" date="94Nov17" tests="">
181 // </reviewed>
182 
183 // <synopsis>
184 // An error was made when using the TiledStMan.
185 // The TiledStMan is quite complex, so it is easy to make mistakes.
186 // The <linkto class=TiledStMan>TiledStMan</linkto> and related
187 // classes should be studied carefully.
188 // </synopsis>
189 
190 class TSMError : public DataManError {
191 public:
192  // Issue the message prefixed by "TiledStMan: ".
193  TSMError (const String& message);
194  ~TSMError () noexcept;
195 };
196 
197 
198 
199 } //# NAMESPACE CASACORE - END
200 
201 #endif
DataManInvOper()
The default constructor generates a generic &quot;invalid operation&quot; message.
Base error class for table data manager.
Definition: DataManError.h:54
Internal table data manager error.
Definition: DataManError.h:76
DataManInternalError(const String &message)
Add given message to string &quot;Internal Table DataManager error: &quot;.
Table DataManager error; error in TiledStMan.
Definition: DataManError.h:190
DataManUnknownVirtualColumn(const String &columnName, const String &engineName)
Issue a message containing the column name.
TSMError(const String &message)
Issue the message prefixed by &quot;TiledStMan: &quot;.
DataManInvDT()
The default constructor generates a generic &quot;invalid data type&quot; message.
Table DataManager error; unknown virtual column.
Definition: DataManError.h:167
Table DataManager error; invalid data type.
Definition: DataManError.h:118
String message
Definition: Error.h:203
Base class for all Casacore library errors.
Definition: Error.h:134
Table DataManager error; invalid operation.
Definition: DataManError.h:144
Table DataManager error; invalid data manager.
Definition: DataManError.h:96
String: the storage and methods of handling collections of characters.
Definition: String.h:223
DataManError()
The default constructor generates the message &quot;Table DataManager error&quot;.
~TSMError() noexcept
DataManUnknownCtor(const String &columnName)
This constructor generates a message that a data manager with the given name is unknown (i...
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42