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// <summary>
39// Base error class for table data manager
40// </summary>
41// <use visibility=export>
42// <reviewed reviewer="Gareth Hunt" date="94Nov17" tests="">
43// </reviewed>
44
45// <synopsis>
46// This is the generic data manager exception; catching this one means
47// catching all DataMan* exceptions.
48// Note that you have to catch AipsError to catch all possible exceptions.
49// </synopsis>
50
51class DataManError : public AipsError {
52 public:
53 // The default constructor generates the message "Table DataManager error".
55 // Construct with given message.
57 ~DataManError() noexcept;
58};
59
60// <summary>
61// Internal table data manager error
62// </summary>
63// <use visibility=export>
64// <reviewed reviewer="Gareth Hunt" date="94Nov17" tests="">
65// </reviewed>
66
67// <synopsis>
68// Internal data manager error (should never be thrown).
69// If this is thrown, something is terribly wrong.
70// </synopsis>
71
73 public:
74 // Add given message to string "Internal Table DataManager error: ".
77};
78
79// <summary>
80// Table DataManager error; invalid data manager
81// </summary>
82// <use visibility=export>
83// <reviewed reviewer="Gareth Hunt" date="94Nov17" tests="">
84// </reviewed>
85
86// <synopsis>
87// A data manager is unknown (i.e. not registered in DataManReg.cc).
88// This means that the data manager object cannot be recreated.
89// </synopsis>
90
92 public:
93 // This constructor generates a message that a data manager
94 // with the given name is unknown (i.e. not registered).
95 DataManUnknownCtor(const String& columnName);
97};
98
99// <summary>
100// Table DataManager error; invalid data type
101// </summary>
102// <use visibility=export>
103// <reviewed reviewer="Gareth Hunt" date="94Nov17" tests="">
104// </reviewed>
105
106// <synopsis>
107// Invalid data type used in the data manager.
108// The data manager found an unknown data type when doing a get or put.
109// In principle this error should never occur.
110// </synopsis>
111
113 public:
114 // The default constructor generates a generic "invalid data type" message.
116 // Put the name of the offending column in the "invalid data type" message.
117 DataManInvDT(const String& columnName);
118 ~DataManInvDT() noexcept;
119};
120
121// <summary>
122// Table DataManager error; invalid operation
123// </summary>
124// <use visibility=export>
125// <reviewed reviewer="Gareth Hunt" date="94Nov17" tests="">
126// </reviewed>
127
128// <synopsis>
129// Invalid operation on a data manager.
130// A request was done that the data manager could not handle.
131// In principle the table system should already test on such operations
132// and it should not bother the data manager with invalid requests.
133// However, the data manager still tests them for safety.
134// </synopsis>
135
137 public:
138 // The default constructor generates a generic "invalid operation" message.
140 // Add given message to string "Invalid DataMan operation: ".
142 ~DataManInvOper() noexcept;
143};
144
145// <summary>
146// Table DataManager error; unknown virtual column
147// </summary>
148// <use visibility=export>
149// <reviewed reviewer="Gareth Hunt" date="94Nov17" tests="">
150// </reviewed>
151
152// <synopsis>
153// A column is unknown to the virtual column engine.
154// This error is caused by binding a column to a virtual column engine
155// which does not know the column name or data type.
156// </synopsis>
157
159 public:
160 // Issue a message containing the column name.
161 DataManUnknownVirtualColumn(const String& columnName, const String& engineName);
163};
164
165// <summary>
166// Table DataManager error; error in TiledStMan
167// </summary>
168// <use visibility=export>
169// <reviewed reviewer="Gareth Hunt" date="94Nov17" tests="">
170// </reviewed>
171
172// <synopsis>
173// An error was made when using the TiledStMan.
174// The TiledStMan is quite complex, so it is easy to make mistakes.
175// The <linkto class=TiledStMan>TiledStMan</linkto> and related
176// classes should be studied carefully.
177// </synopsis>
178
179class TSMError : public DataManError {
180 public:
181 // Issue the message prefixed by "TiledStMan: ".
183 ~TSMError() noexcept;
184};
185
186} // namespace casacore
187
188#endif
AipsError(const Char *str, Category c=GENERAL)
Creates an AipsError and initializes the error message from the parameter.
DataManError(const String &message)
Construct with given message.
DataManError()
The default constructor generates the message "Table DataManager error".
DataManInternalError(const String &message)
Add given message to string "Internal Table DataManager error: ".
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.
DataManInvOper()
The default constructor generates a generic "invalid operation" message.
DataManInvOper(const String &message)
Add given message to string "Invalid DataMan operation: ".
DataManUnknownCtor(const String &columnName)
This constructor generates a message that a data manager with the given name is unknown (i....
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:355
~TSMError() noexcept
TSMError(const String &message)
Issue the message prefixed by "TiledStMan: ".
For temporary backward namespace compatibility, use casa as alias for casacore.
Definition mainpage.dox:28