casacore
Loading...
Searching...
No Matches
casa
Exceptions.h
Go to the documentation of this file.
1
// # Exceptions.h: a module for exception handling
2
// # Copyright (C) 1995,1999,2000,2001
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 CASA_EXCEPTIONS_H
27
#define CASA_EXCEPTIONS_H
28
29
#include <casacore/casa/aips.h>
30
31
#include <casacore/casa/Exceptions/Error.h>
32
33
namespace
casacore
{
// # NAMESPACE CASACORE - BEGIN
34
35
// <module>
36
//
37
// <summary>
38
// Exception handling
39
// </summary>
40
//
41
// <reviewed reviewer="UNKNOWN" date="before2004/08/25" demos="">
42
// </reviewed>
43
//
44
// <synopsis>
45
// This module provides the exception handling mechanism used in Casacore.
46
// It allows the user to define new exception types and to <src>throw</src>,
47
// <src>catch</src>, and <src>rethrow</src> these exceptions. The interface
48
// to this exception handling mechanism is very similary to the ANSI standard
49
// exceptions. This will make it easy to switch when the time comes.
50
//
51
// This module supplies several <linkto file="Error.h">common exception types </linkto>.
52
// These provide examples for creating new errors.
53
//
54
// At some point, this exception mechanism will probably be replaced with
55
// compiler supported exceptions.
56
// </synopsis>
57
//
58
// <example>
59
// <em>This example shows how a more specific exception can be caught as
60
// a more general exception:</em>
61
// <srcblock>
62
// #include <casacore/casa/Exceptions.h>
63
// #include <iostream>
64
// main() {
65
// try {
66
// throw(indexError<int>(5,"Dummy error"));
67
// } catch (IndexError xx) {
68
// cout << "caught IndexError" << endl;
69
// }
70
// }
71
// </srcblock>
72
// </example>
73
// </module>
74
75
}
// namespace casacore
76
77
#endif
casacore
For temporary backward namespace compatibility, use casa as alias for casacore.
Definition
mainpage.dox:28
Generated by
1.15.0