CCfits 2.7
FitsError.h
1// Astrophysics Science Division,
2// NASA/ Goddard Space Flight Center
3// HEASARC
4// http://heasarc.gsfc.nasa.gov
5// e-mail: ccfits@legacy.gsfc.nasa.gov
6//
7// Original author: Ben Dorman
8
9#ifndef FITSERROR_H
10#define FITSERROR_H 1
11#include <exception>
12#include <iostream>
13//#include <exception>
14//#include <iostream>
15//#include <stl.h>
16#include <string>
17using std::string;
18
19
20namespace CCfits {
21
88 // Base class for exceptions generated by CCfits that don't
89 // return FITS error codes (for example, array errors or seek errors).
90
91
92
94 {
95 public:
96 FitsException (const string& msg, bool& silent);
97
98 const string& message () const;
99
100 protected:
101 void addToMessage (const string& msgQual);
102
103 private:
104 private: //## implementation
105 // Data Members for Class Attributes
106 string m_message;
107
108 };
109
110
111
112 class FitsError : public FitsException //## Inherits: <unnamed>%399170BD017D
113 {
114 public:
115 FitsError (int errornum, bool silent = true);
116
117 protected:
118 private:
119 void printMsg (int error);
120
121 private: //## implementation
122 };
123
124
125
127 {
128 public:
129 FitsFatal (const string& diag);
130
131 protected:
132 private:
133 private: //## implementation
134 };
135
136 // Class CCfits::FitsException
137
138 inline const string& FitsException::message () const
139 {
140 return m_message;
141 }
142
143 // Class CCfits::FitsError
144
145 // Class CCfits::FitsFatal
146
147} // namespace CCfits
148
149
150#endif
FitsError is the exception thrown by non-zero cfitsio status codes.
Definition FitsError.h:113
FitsException is the base class for all exceptions thrown by this library.
Definition FitsError.h:94
const string & message() const
returns the error message
Definition FitsError.h:138
[potential] base class for exceptions to be thrown on internal library error.
Definition FitsError.h:127
Namespace enclosing all CCfits classes and globals definitions.
Definition AsciiTable.cxx:26