#include <Exception.hpp>
Inheritance diagram for Exception:

None of the functions in this class throws exceptions because an exception has probably already been thrown or is about to be thrown. Each exception object contains the following:
Exception provides all of the functions required for it and its derived classes, including functions that operate on the text strings in the stack.
Definition at line 155 of file Exception.hpp.
Public Types | |
| enum | Severity { unrecoverable, recoverable } |
| Exception severity classes. More... | |
Public Member Functions | |
| Exception () throw () | |
| Default constructor. | |
| Exception (const std::string &errorText, const unsigned long &errorId=0, const Severity &severity=unrecoverable) throw () | |
| Full constructor for exception. | |
| Exception (const Exception &exception) throw () | |
| Copy constructor. | |
| ~Exception () throw () | |
| Destructor. | |
| Exception & | operator= (const Exception &e) throw () |
| Assignment operator. | |
| void | terminate () throw () |
| Ends the application. | |
| unsigned long | getErrorId () const throw () |
| Returns the error ID of the exception. | |
| Exception & | setErrorId (const unsigned long &errId) throw () |
| Sets the error ID to the specified value. | |
| Exception & | addLocation (const ExceptionLocation &location) throw () |
| Adds the location information to the exception object. | |
| const ExceptionLocation | getLocation (const size_t &index=0) const throw () |
| Returns the ExceptionLocation object at the specified index. | |
| size_t | getLocationCount () const throw () |
| Returns the number of locations stored in the exception location array. | |
| bool | isRecoverable () const throw () |
| If the thrower (that is, whatever creates the exception) determines the exception is recoverable, 1 is returned. | |
| Exception & | setSeverity (const Severity &sever) throw () |
| Sets the severity of the exception. | |
| Exception & | addText (const std::string &errorText) throw () |
| Appends the specified text to the text string on the top of the exception text stack. | |
| std::string | getText (const size_t &index=0) const throw () |
| Returns an exception text string from the exception text stack. | |
| size_t | getTextCount () const throw () |
| Returns the number of text strings in the exception text stack. | |
| std::string | getName () const throw () |
| Returns the name of the object's class. | |
| void | dump (std::ostream &s) const throw () |
| Debug output function. | |
| std::string | what () const throw () |
| Dump to a string. | |
Protected Member Functions | |
| int | overflow (int c) |
| This is the streambuf function that actually outputs the data to the device. | |
Protected Attributes | |
| unsigned long | errorId |
| Error code. | |
| std::vector< ExceptionLocation > | locations |
| Stack of exception locations (where it was thrown). | |
| Severity | severity |
| Severity of exception. | |
| std::vector< std::string > | text |
| Text stack describing exception condition. | |
Friends | |
| std::ostream & | operator<< (std::ostream &s, const Exception &e) throw () |
| Output stream operator for ::Exception. | |
|
|
Exception severity classes.
Definition at line 159 of file Exception.hpp. |
|
|
Default constructor. Does nothing. Definition at line 66 of file Exception.cpp. |
|
||||||||||||||||
|
Full constructor for exception.
Definition at line 71 of file Exception.cpp. |
|
|
Copy constructor.
Definition at line 81 of file Exception.cpp. |
|
|
Destructor.
Definition at line 186 of file Exception.hpp. |
|
|
Adds the location information to the exception object. The library captures this information when an exception is thrown or rethrown. An array of ExceptionLocation objects is stored in the exception object.
Definition at line 104 of file Exception.cpp. |
|
|
Appends the specified text to the text string on the top of the exception text stack.
Definition at line 132 of file Exception.cpp. Referenced by GPSZcount::addWeeks(), GPSZcount::addZcounts(), FileSpec::extractDayTime(), FileSpec::init(), FileHunter::init(), Exception::overflow(), SMODFData::reallyPutRecord(), RinexObsHeader::reallyPutRecord(), RinexNavHeader::reallyPutRecord(), RinexMetHeader::reallyPutRecord(), IonexHeader::reallyPutRecord(), AntexHeader::reallyPutRecord(), FileHunter::searchHelper(), Position::setToString(), and DayTime::setToString(). |
|
|
Debug output function.
Definition at line 159 of file Exception.cpp. Referenced by FileHunter::dump(), gpstk::operator<<(), and Exception::what(). |
|
|
Returns the error ID of the exception.
Definition at line 206 of file Exception.hpp. |
|
|
Returns the ExceptionLocation object at the specified index.
Definition at line 112 of file Exception.cpp. |
|
|
Returns the number of locations stored in the exception location array.
Definition at line 126 of file Exception.cpp. References Exception::locations. |
|
|
|
Returns an exception text string from the exception text stack.
Definition at line 139 of file Exception.cpp. |
|
|
Returns the number of text strings in the exception text stack.
Definition at line 153 of file Exception.cpp. References Exception::text. |
|
|
If the thrower (that is, whatever creates the exception) determines the exception is recoverable, 1 is returned. If the thrower determines it is unrecoverable, 0 is returned. Definition at line 253 of file Exception.hpp. |
|
|
Assignment operator.
Definition at line 90 of file Exception.cpp. |
|
|
This is the streambuf function that actually outputs the data to the device. Since all output should be done with the standard ostream operators, this function should never be called directly. In the case of this class, the characters to be output are stored in a buffer and added to the exception text after each newline. Definition at line 173 of file Exception.cpp. References Exception::addText(). |
|
|
Sets the error ID to the specified value.
Definition at line 215 of file Exception.hpp. |
|
|
Sets the severity of the exception.
Definition at line 262 of file Exception.hpp. |
|
|
Ends the application. Normally, the library only intends this function to be used internally by the library's exception-handling macros when the compiler you are using does not support C++ exception handling. This only occurs if you define the NO_EXCEPTIONS_SUPPORT macro. Definition at line 201 of file Exception.hpp. |
|
|
Dump to a string.
Definition at line 197 of file Exception.cpp. References Exception::dump(). |
|
||||||||||||
|
Output stream operator for ::Exception. This is intended just to dump all the data in the ::Exception to the indicated stream.
|
|
|
Error code.
Definition at line 318 of file Exception.hpp. |
|
|
Stack of exception locations (where it was thrown).
Definition at line 320 of file Exception.hpp. Referenced by Exception::getLocationCount(). |
|
|
Severity of exception.
Definition at line 322 of file Exception.hpp. |
|
|
Text stack describing exception condition.
Definition at line 324 of file Exception.hpp. Referenced by Exception::getTextCount(). |
1.3.9.1