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: 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>
33#include <casacore/casa/Exceptions/Error.h>
34
35namespace 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
54class DataManError : public AipsError {
55public:
56 // The default constructor generates the message "Table DataManager error".
58 // Construct with given 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
77public:
78 // Add given message to string "Internal Table DataManager error: ".
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
97public:
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);
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
119public:
120 // The default constructor generates a generic "invalid data type" message.
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
145public:
146 // The default constructor generates a generic "invalid operation" message.
148 // Add given message to string "Invalid DataMan operation: ".
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
168public:
169 // Issue a message containing the column name.
171 const String& engineName);
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
190class TSMError : public DataManError {
191public:
192 // Issue the message prefixed by "TiledStMan: ".
194 ~TSMError () noexcept;
195};
196
197
198
199} //# NAMESPACE CASACORE - END
200
201#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:225
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