Exceptions.h

Go to the documentation of this file.
00001 //# Exceptions.h:  a module for exception handling
00002 //# Copyright (C) 1995,1999,2000,2001
00003 //# Associated Universities, Inc. Washington DC, USA.
00004 //#
00005 //# This library is free software; you can redistribute it and/or modify it
00006 //# under the terms of the GNU Library General Public License as published by
00007 //# the Free Software Foundation; either version 2 of the License, or (at your
00008 //# option) any later version.
00009 //#
00010 //# This library is distributed in the hope that it will be useful, but WITHOUT
00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00013 //# License for more details.
00014 //#
00015 //# You should have received a copy of the GNU Library General Public License
00016 //# along with this library; if not, write to the Free Software Foundation,
00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00018 //#
00019 //# Correspondence concerning AIPS++ should be addressed as follows:
00020 //#        Internet email: aips2-request@nrao.edu.
00021 //#        Postal address: AIPS++ Project Office
00022 //#                        National Radio Astronomy Observatory
00023 //#                        520 Edgemont Road
00024 //#                        Charlottesville, VA 22903-2475 USA
00025 //#
00026 //# $Id$
00027 
00028 #ifndef CASA_EXCEPTIONS_H
00029 #define CASA_EXCEPTIONS_H
00030 
00031 
00032 #include <casacore/casa/aips.h>
00033 
00034 #include <casacore/casa/Exceptions/Error.h>
00035 
00036 namespace casacore { //# NAMESPACE CASACORE - BEGIN
00037 
00038 // <module>
00039 //
00040 // <summary>
00041 //     Exception handling
00042 // </summary>
00043 //
00044 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" demos="">
00045 // </reviewed>
00046 //
00047 // <synopsis>
00048 // This module provides the exception handling mechanism used in Casacore.
00049 // It allows the user to define new exception types and to <src>throw</src>,
00050 // <src>catch</src>, and <src>rethrow</src> these exceptions. The interface
00051 // to this exception handling mechanism is very similary to the ANSI standard
00052 // exceptions. This will make it easy to switch when the time comes.
00053 //
00054 // This module supplies several <linkto file="Error.h">common exception types </linkto>.
00055 // These provide examples for creating new errors.
00056 //
00057 // At some point, this exception mechanism will probably be replaced with
00058 // compiler supported exceptions.
00059 // </synopsis>
00060 //
00061 // <example>
00062 // <em>This example shows how a more specific exception can be caught as
00063 // a more general exception:</em>
00064 // <srcblock>
00065 //     #include <casacore/casa/Exceptions.h>
00066 //     #include <iostream>
00067 //     main() {
00068 //         try {
00069 //             throw(indexError<int>(5,"Dummy error"));
00070 //         } catch (IndexError xx) {
00071 //             cout << "caught IndexError" << endl;
00072 //         } 
00073 //     }
00074 // </srcblock>
00075 // </example>
00076 // </module>
00077 
00078 
00079 } //# NAMESPACE CASACORE - END
00080 
00081 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1