casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
SynthesisError.h
Go to the documentation of this file.
00001 //# SynthesisError.h: Synthesis module exception classes
00002 //# Copyright (C) 1994,1995,1996,1997,1999,2000
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 SYNTHESIS_SYNTHESISERROR_H
00029 #define SYNTHESIS_SYNTHESISERROR_H
00030 
00031 //# Includes
00032 #include <casa/aips.h>
00033 #include <casa/Exceptions/Error.h>
00034 
00035 
00036 namespace casa { //# NAMESPACE CASA - BEGIN
00037 
00038   //# This header file defines the error classes thrown by the
00039   //# Synthesis module and related classes.
00040 
00041 
00042   // <summary>
00043   // </summary>
00044   // <use visibility=export>
00045   // <reviewed reviewer="UNKNOWN" date="" tests="">
00046   // </reviewed>
00047 
00048   // <synopsis> 
00049   //
00050   // The top-level generic SynthesisError exception class.  All
00051   // exceptions either generated in the synthesis module, or
00052   // exceptions caught in the synthesis module and transformed into
00053   // more specialized exceptions are derived from this.  Catching this
00054   // class will catch only Synthesis module exceptions (but all
00055   // exceptions from the Synthesis module).  To catch more specific
00056   // exceptions, catch the derived classes.  Note that you have to
00057   // catch AipsError to catch all possible exceptions thrown by all of
00058   // AIPS++ modules!
00059   //
00060   //</synopsis>
00061   
00062   class SynthesisError : public AipsError {
00063   public:
00064     // The default constructor generates the message "Table error".
00065     SynthesisError (Category c=GENERAL);
00066     // Construct with given message.
00067     void changeMessage(String& message);
00068     void addMessage(String& message);
00069     SynthesisError (const String& message,Category c=GENERAL);
00070     ~SynthesisError () throw();
00071   };
00072   
00073   
00074   // <summary>
00075   // Error thrown by the classes in the Synthesis module
00076   // </summary>
00077   // <use visibility=export>
00078   // <reviewed reviewer="UNKNOWN" date="" tests="">
00079   // </reviewed>
00080   
00081   // <synopsis> 
00082   // </synopsis> 
00083   
00084   class SynthesisFTMachineError : public SynthesisError {
00085   public:
00086     SynthesisFTMachineError (const String& message,Category c=GENERAL);
00087     ~SynthesisFTMachineError () throw();
00088   };
00089 
00090   class PSFZero: public SynthesisFTMachineError {
00091   public:
00092     PSFZero (const String& message,Category c=GENERAL);
00093     ~PSFZero () throw();
00094   };
00095 
00096   class NoSenPattern: public SynthesisFTMachineError {
00097   public:
00098     NoSenPattern(const String& message, Category c=GENERAL);
00099     ~NoSenPattern() throw();
00100   };
00101 
00102   class CFNotCached: public SynthesisError{
00103   public:
00104     CFNotCached(const String& message, Category c=GENERAL);
00105     ~CFNotCached() throw();
00106   };
00107 } //# NAMESPACE CASA - END
00108 
00109 #endif