casacore
Loading...
Searching...
No Matches
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: casa-feedback@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#ifndef TABLES_DATAMANERROR_H
27#define TABLES_DATAMANERROR_H
28
29//# Includes
30#include <casacore/casa/aips.h>
31#include <casacore/casa/Exceptions/Error.h>
32
33namespace casacore { //# NAMESPACE CASACORE - BEGIN
34
35//# This header file defines the error classes used in the
36//# data manager classes.
37
38
39// <summary>
40// Base error class for table data manager
41// </summary>
42// <use visibility=export>
43// <reviewed reviewer="Gareth Hunt" date="94Nov17" tests="">
44// </reviewed>
45
46// <synopsis>
47// This is the generic data manager exception; catching this one means
48// catching all DataMan* exceptions.
49// Note that you have to catch AipsError to catch all possible exceptions.
50// </synopsis>
51
52class DataManError : public AipsError {
53public:
54 // The default constructor generates the message "Table DataManager error".
56 // Construct with given message.
58 ~DataManError () noexcept;
59};
60
61
62// <summary>
63// Internal table data manager error
64// </summary>
65// <use visibility=export>
66// <reviewed reviewer="Gareth Hunt" date="94Nov17" tests="">
67// </reviewed>
68
69// <synopsis>
70// Internal data manager error (should never be thrown).
71// If this is thrown, something is terribly wrong.
72// </synopsis>
73
75public:
76 // Add given message to string "Internal Table DataManager error: ".
79};
80
81
82// <summary>
83// Table DataManager error; invalid data manager
84// </summary>
85// <use visibility=export>
86// <reviewed reviewer="Gareth Hunt" date="94Nov17" tests="">
87// </reviewed>
88
89// <synopsis>
90// A data manager is unknown (i.e. not registered in DataManReg.cc).
91// This means that the data manager object cannot be recreated.
92// </synopsis>
93
95public:
96 // This constructor generates a message that a data manager
97 // with the given name is unknown (i.e. not registered).
98 DataManUnknownCtor (const String& columnName);
100};
101
102
103// <summary>
104// Table DataManager error; invalid data type
105// </summary>
106// <use visibility=export>
107// <reviewed reviewer="Gareth Hunt" date="94Nov17" tests="">
108// </reviewed>
109
110// <synopsis>
111// Invalid data type used in the data manager.
112// The data manager found an unknown data type when doing a get or put.
113// In principle this error should never occur.
114// </synopsis>
115
117public:
118 // The default constructor generates a generic "invalid data type" message.
120 // Put the name of the offending column in the "invalid data type" message.
121 DataManInvDT (const String& columnName);
122 ~DataManInvDT () noexcept;
123};
124
125
126
127// <summary>
128// Table DataManager error; invalid operation
129// </summary>
130// <use visibility=export>
131// <reviewed reviewer="Gareth Hunt" date="94Nov17" tests="">
132// </reviewed>
133
134// <synopsis>
135// Invalid operation on a data manager.
136// A request was done that the data manager could not handle.
137// In principle the table system should already test on such operations
138// and it should not bother the data manager with invalid requests.
139// However, the data manager still tests them for safety.
140// </synopsis>
141
143public:
144 // The default constructor generates a generic "invalid operation" message.
146 // Add given message to string "Invalid DataMan operation: ".
148 ~DataManInvOper () noexcept;
149};
150
151
152// <summary>
153// Table DataManager error; unknown virtual column
154// </summary>
155// <use visibility=export>
156// <reviewed reviewer="Gareth Hunt" date="94Nov17" tests="">
157// </reviewed>
158
159// <synopsis>
160// A column is unknown to the virtual column engine.
161// This error is caused by binding a column to a virtual column engine
162// which does not know the column name or data type.
163// </synopsis>
164
166public:
167 // Issue a message containing the column name.
169 const String& engineName);
171};
172
173
174// <summary>
175// Table DataManager error; error in TiledStMan
176// </summary>
177// <use visibility=export>
178// <reviewed reviewer="Gareth Hunt" date="94Nov17" tests="">
179// </reviewed>
180
181// <synopsis>
182// An error was made when using the TiledStMan.
183// The TiledStMan is quite complex, so it is easy to make mistakes.
184// The <linkto class=TiledStMan>TiledStMan</linkto> and related
185// classes should be studied carefully.
186// </synopsis>
187
188class TSMError : public DataManError {
189public:
190 // Issue the message prefixed by "TiledStMan: ".
192 ~TSMError () noexcept;
193};
194
195
196
197} //# NAMESPACE CASACORE - END
198
199#endif
DataManError(const String &message)
Construct with given message.
DataManError()
The default constructor generates the message "Table DataManager error".
Internal table data manager error.
DataManInternalError(const String &message)
Add given message to string "Internal Table DataManager error: ".
Table DataManager error; invalid data type.
DataManInvDT()
The default constructor generates a generic "invalid data type" message.
DataManInvDT(const String &columnName)
Put the name of the offending column in the "invalid data type" message.
Table DataManager error; invalid operation.
DataManInvOper()
The default constructor generates a generic "invalid operation" message.
DataManInvOper(const String &message)
Add given message to string "Invalid DataMan operation: ".
Table DataManager error; invalid data manager.
DataManUnknownCtor(const String &columnName)
This constructor generates a message that a data manager with the given name is unknown (i....
Table DataManager error; unknown virtual column.
DataManUnknownVirtualColumn(const String &columnName, const String &engineName)
Issue a message containing the column name.
String: the storage and methods of handling collections of characters.
Definition String.h:223
Table DataManager error; error in TiledStMan.
~TSMError() noexcept
TSMError(const String &message)
Issue the message prefixed by "TiledStMan: ".
this file contains all the compiler specific defines
Definition mainpage.dox:28