CCfits: FitsError.h Source File

CCfits 2.7

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List

FitsError.h

    00001 //  Astrophysics Science Division,
    00002 //  NASA/ Goddard Space Flight Center
    00003 //  HEASARC
    00004 //  http://heasarc.gsfc.nasa.gov
    00005 //  e-mail: ccfits@legacy.gsfc.nasa.gov
    00006 //
    00007 //  Original author: Ben Dorman
    00008
    00009 #ifndef FITSERROR_H
    00010 #define FITSERROR_H 1
    00011 #include <exception>
    00012 #include <iostream>
    00013 //#include <exception>
    00014 //#include <iostream>
    00015 //#include <stl.h>
    00016 #include <string>
    00017 using std::string;
    00018
    00019
    00020 namespace CCfits {
    00021
    00088   //    Base class for exceptions generated by CCfits that don't
    00089   //    return FITS error codes (for example, array errors or seek errors).
    00090
    00091
    00092
    00093   class FitsException
    00094   {
    00095     public:
    00096         FitsException (const string& msg, bool& silent);
    00097
    00098         const string& message () const;
    00099
    00100     protected:
    00101         void addToMessage (const string& msgQual);
    00102
    00103     private:
    00104     private: //## implementation
    00105       // Data Members for Class Attributes
    00106         string m_message;
    00107
    00108   };
    00109
    00110
    00111
    00112   class FitsError : public FitsException  //## Inherits: <unnamed>%399170BD017D
    00113   {
    00114     public:
    00115         FitsError (int errornum, bool silent = true);
    00116
    00117     protected:
    00118     private:
    00119         void printMsg (int error);
    00120
    00121     private: //## implementation
    00122   };
    00123
    00124
    00125
    00126   class FitsFatal
    00127   {
    00128     public:
    00129         FitsFatal (const string& diag);
    00130
    00131     protected:
    00132     private:
    00133     private: //## implementation
    00134   };
    00135
    00136   // Class CCfits::FitsException
    00137
    00138   inline const string& FitsException::message () const
    00139   {
    00140      return m_message;
    00141   }
    00142
    00143   // Class CCfits::FitsError
    00144
    00145   // Class CCfits::FitsFatal
    00146
    00147 } // namespace CCfits
    00148
    00149
    00150 #endif