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