FitsError.h
// Astrophysics Science Division,
// NASA/ Goddard Space Flight Center
// HEASARC
// http://heasarc.gsfc.nasa.gov
// e-mail: ccfits@legacy.gsfc.nasa.gov
//
// Original author: Ben Dorman
#ifndef FITSERROR_H
#define FITSERROR_H 1
#include <exception>
#include <iostream>
//#include <exception>
//#include <iostream>
//#include <stl.h>
#include <string>
using std::string;
namespace CCfits {
// Base class for exceptions generated by CCfits that don't
// return FITS error codes (for example, array errors or seek errors).
class FitsException
{
public:
FitsException (const string& msg, bool& silent);
const string& message () const;
protected:
void addToMessage (const string& msgQual);
private:
private: //## implementation
// Data Members for Class Attributes
string m_message;
};
class FitsError : public FitsException //## Inherits: <unnamed>%399170BD017D
{
public:
FitsError (int errornum, bool silent = true);
protected:
private:
void printMsg (int error);
private: //## implementation
};
class FitsFatal
{
public:
FitsFatal (const string& diag);
protected:
private:
private: //## implementation
};
// Class CCfits::FitsException
inline const string& FitsException::message () const
{
return m_message;
}
// Class CCfits::FitsError
// Class CCfits::FitsFatal
} // namespace CCfits
#endif
CCfits::FitsException::FitsException
FitsException(const string &msg, bool &silent)
Definition: FitsError.cxx:42
CCfits::FitsError
FitsError is the exception thrown by non-zero cfitsio status codes.
Definition: FitsError.h:112
CCfits::FitsError::FitsError
FitsError(int errornum, bool silent=true)
ctor for cfitsio exception: translates status code into cfitsio error message
Definition: FitsError.cxx:23
CCfits::FitsException
FitsException is the base class for all exceptions thrown by this library.
Definition: FitsError.h:93
CCfits::FitsFatal
[potential] base class for exceptions to be thrown on internal library error.
Definition: FitsError.h:126
CCfits::FitsException::message
const string & message() const
returns the error message
Definition: FitsError.h:138
CCfits::FitsFatal::FitsFatal
FitsFatal(const string &diag)
Prints a message starting &quot;*** CCfits Fatal Error: ...&quot; and calls terminate()
Definition: FitsError.cxx:63