casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
MSSelectionError.h
Go to the documentation of this file.
00001 //# MSSelectionError.h: MSSelection error 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: MSSelectionError.h 20739 2009-09-29 01:15:15Z Malte.Marquarding $
00027 
00028 #ifndef MS_MSSELECTIONERROR_H
00029 #define MS_MSSELECTIONERROR_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   //# MSSelection 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   // The top-level generic MSSelection exception class.  All
00050   // exceptions thrown by the MSSelection and related classes are
00051   // derived from this.  Catching this class will catch only MSSelection
00052   // exceptions (but all exceptions from the MSSelection line of
00053   // classes).  To catch more specific MSSelection exceptions, catch
00054   // the derived classes.  Note that you have to catch AipsError to
00055   // catch all possible exceptions thrown by all of AIPS++ modules! 
00056   //</synopsis>
00057   
00058   class MSSelectionError : public AipsError {
00059   public:
00060     // The default constructor generates the message "Table error".
00061     MSSelectionError (Category c=GENERAL);
00062     // Construct with given message.
00063     void changeMessage(String& message);
00064     void addMessage(String& message);
00065     void reset() {message="";};
00066     MSSelectionError (const String& message,Category c=GENERAL);
00067     ~MSSelectionError () throw();
00068     Bool hasMessage;
00069   };
00070   //
00071   //-------------------------------------------------------------------
00072   //  
00073   class MSSelectionNullSelection : public MSSelectionError {
00074   public:
00075     MSSelectionNullSelection (const String& message, Category c=GENERAL);
00076     ~MSSelectionNullSelection () throw();
00077   };
00078   //
00079   //-------------------------------------------------------------------
00080   //  
00081   class MSSelectionNullExpr : public MSSelectionError {
00082   public:
00083     MSSelectionNullExpr (const String& message, Category c=GENERAL);
00084     ~MSSelectionNullExpr () throw();
00085   };
00086   //
00087   //-------------------------------------------------------------------
00088   //  
00089   class MSSelectionNullTEN : public MSSelectionError {
00090   public:
00091     MSSelectionNullTEN (const String& message, Category c=GENERAL);
00092     ~MSSelectionNullTEN () throw();
00093   };
00094   //
00095   //-------------------------------------------------------------------
00096   //  
00097   class MSSelectionTimeError : public MSSelectionError {
00098   public:
00099     // Add given message to string "MSSelection time error: ".
00100     MSSelectionTimeError (const String& message,Category c=GENERAL);
00101     ~MSSelectionTimeError () throw();
00102   };
00103   
00104   class MSSelectionTimeParseError: public MSSelectionTimeError {
00105   public:
00106     MSSelectionTimeParseError (const String& message,Category c=GENERAL);
00107     ~MSSelectionTimeParseError () throw();
00108   };
00109   //
00110   //-------------------------------------------------------------------
00111   //  
00112   class MSSelectionAntennaError : public MSSelectionError {
00113   public:
00114     // Add given message to string "MSSelection time error: ".
00115     MSSelectionAntennaError (const String& message,Category c=GENERAL);
00116     ~MSSelectionAntennaError () throw();
00117   };
00118   //
00119   //-------------------------------------------------------------------
00120   //  
00121   
00122   class MSSelectionAntennaParseError: public MSSelectionAntennaError {
00123   public:
00124     MSSelectionAntennaParseError (const String& message,Category c=GENERAL);
00125     ~MSSelectionAntennaParseError () throw();
00126   };
00127   //
00128   //-------------------------------------------------------------------
00129   //  
00130   class MSSelectionFieldError : public MSSelectionError {
00131   public:
00132     // Add given message to string "MSSelection time error: ".
00133     MSSelectionFieldError (const String& message,Category c=GENERAL);
00134     ~MSSelectionFieldError () throw();
00135   };
00136   
00137   //
00138   //-------------------------------------------------------------------
00139   //  
00140   class MSSelectionFieldParseError: public MSSelectionFieldError {
00141   public:
00142     MSSelectionFieldParseError (const String& message,Category c=GENERAL);
00143     ~MSSelectionFieldParseError () throw();
00144   };
00145   //
00146   //-------------------------------------------------------------------
00147   //  
00148   class MSSelectionFieldWarning: public MSSelectionFieldError {
00149   public:
00150     MSSelectionFieldWarning (const String& message,Category c=GENERAL);
00151     ~MSSelectionFieldWarning () throw();
00152   };
00153   //
00154   //-------------------------------------------------------------------
00155   //  
00156   class MSSelectionUvDistError : public MSSelectionError {
00157   public:
00158     // Add given message to string "MSSelection time error: ".
00159     MSSelectionUvDistError (const String& message,Category c=GENERAL);
00160     ~MSSelectionUvDistError () throw();
00161   };
00162   
00163   class MSSelectionUvDistParseError: public MSSelectionUvDistError {
00164   public:
00165     MSSelectionUvDistParseError (const String& message,Category c=GENERAL);
00166     ~MSSelectionUvDistParseError () throw();
00167   };
00168   //
00169   //-------------------------------------------------------------------
00170   //  
00171   class MSSelectionSpwError : public MSSelectionError {
00172   public:
00173     // Add given message to string "MSSelection time error: ".
00174     MSSelectionSpwError (const String& message,Category c=GENERAL);
00175     ~MSSelectionSpwError () throw();
00176   };
00177   
00178   class MSSelectionSpwParseError: public MSSelectionSpwError {
00179   public:
00180     MSSelectionSpwParseError (const String& message,Category c=GENERAL);
00181     ~MSSelectionSpwParseError () throw();
00182   };
00183 
00184   class MSSelectionSpwWarning: public MSSelectionSpwError {
00185   public:
00186     MSSelectionSpwWarning (const String& message,Category c=GENERAL);
00187     ~MSSelectionSpwWarning () throw();
00188   };
00189   //
00190   //-------------------------------------------------------------------
00191   //
00192   class MSSelectionScanError : public MSSelectionError {
00193   public:
00194     // Add given message to string "MSSelection time error: ".
00195     MSSelectionScanError (const String& message,Category c=GENERAL);
00196     ~MSSelectionScanError () throw();
00197   };
00198   
00199   class MSSelectionScanParseError: public MSSelectionScanError {
00200   public:
00201     MSSelectionScanParseError (const String& message,Category c=GENERAL);
00202     ~MSSelectionScanParseError () throw();
00203   };
00204 
00205   class MSSelectionScanWarning: public MSSelectionScanError {
00206   public:
00207     MSSelectionScanWarning (const String& message,Category c=GENERAL);
00208     ~MSSelectionScanWarning () throw();
00209   };
00210   //
00211   //-------------------------------------------------------------------
00212   //  
00213   class MSSelectionArrayError : public MSSelectionError {
00214   public:
00215     // Add given message to string "MSSelection time error: ".
00216     MSSelectionArrayError (const String& message,Category c=GENERAL);
00217     ~MSSelectionArrayError () throw();
00218   };
00219   
00220   class MSSelectionArrayParseError: public MSSelectionArrayError {
00221   public:
00222     MSSelectionArrayParseError (const String& message,Category c=GENERAL);
00223     ~MSSelectionArrayParseError () throw();
00224   };
00225 
00226   class MSSelectionArrayWarning: public MSSelectionArrayError {
00227   public:
00228     MSSelectionArrayWarning (const String& message,Category c=GENERAL);
00229     ~MSSelectionArrayWarning () throw();
00230   };
00231   //
00232   //-------------------------------------------------------------------
00233   //  
00234   class MSSelectionPolnError : public MSSelectionError {
00235   public:
00236     // Add given message to string "MSSelection time error: ".
00237     MSSelectionPolnError (const String& message,Category c=GENERAL);
00238     ~MSSelectionPolnError () throw();
00239   };
00240   
00241   class MSSelectionPolnParseError: public MSSelectionPolnError {
00242   public:
00243     MSSelectionPolnParseError (const String& message,Category c=GENERAL);
00244     ~MSSelectionPolnParseError () throw();
00245   };
00246 
00247   class MSSelectionPolnWarning: public MSSelectionPolnError {
00248   public:
00249     MSSelectionPolnWarning (const String& message,Category c=GENERAL);
00250     ~MSSelectionPolnWarning () throw();
00251   };
00252 
00253   //
00254   //-------------------------------------------------------------------
00255   //  
00256   class MSSelectionStateError : public MSSelectionError {
00257   public:
00258     // Add given message to string "MSSelection time error: ".
00259     MSSelectionStateError (const String& message,Category c=GENERAL);
00260     ~MSSelectionStateError () throw();
00261   };
00262   
00263   class MSSelectionStateParseError: public MSSelectionStateError {
00264   public:
00265     MSSelectionStateParseError (const String& message,Category c=GENERAL);
00266     ~MSSelectionStateParseError () throw();
00267   };
00268 
00269   class MSSelectionStateWarning: public MSSelectionStateError {
00270   public:
00271     MSSelectionStateWarning (const String& message,Category c=GENERAL);
00272     ~MSSelectionStateWarning () throw();
00273   };
00274   //
00275   //-------------------------------------------------------------------
00276   //  
00277   class MSSelectionObservationError : public MSSelectionError {
00278   public:
00279     // Add given message to string "MSSelection time error: ".
00280     MSSelectionObservationError (const String& message,Category c=GENERAL);
00281     ~MSSelectionObservationError () throw();
00282   };
00283   
00284   class MSSelectionObservationParseError: public MSSelectionObservationError {
00285   public:
00286     MSSelectionObservationParseError (const String& message,Category c=GENERAL);
00287     ~MSSelectionObservationParseError () throw();
00288   };
00289 
00290   class MSSelectionObservationWarning: public MSSelectionObservationError {
00291   public:
00292     MSSelectionObservationWarning (const String& message,Category c=GENERAL);
00293     ~MSSelectionObservationWarning () throw();
00294   };
00295   //
00296   //-------------------------------------------------------------------
00297   //  
00298   String constructMessage(const Int pos, const String& command);
00299 } //# NAMESPACE CASA - END
00300 
00301 #endif