#include <Error.h>
Inheritance diagram for casa::AipsError:


Part of API
This is the base class for all of the AIPS++ error classes. Because all of the errors have a common base class, any error can be caught with a single catch statement.
This class has a string which allows error messages to be propagated.
Tip: The string member must be handled very carefully because string is also derived from cleanup, thus the message.makePermanent() call in the implementation of the constructors. This prevents the String from being cleaned up in the middle of an exception.
throw(AipsError("SOME STRING"));
Definition at line 75 of file Error.h.
Public Types | |
| enum | Category |
Public Member Functions | |
| virtual const char * | what () const throw () |
| Simply returns the stored error message. | |
| const String & | getMesg () const |
| const AipsError::Category | getCategory () const |
| ~AipsError () throw () | |
| Destructor which does nothing. | |
| AipsError (const Char *str, Category c=GENERAL) | |
| Creates an AipsError and initializes the error message from the parameter. | |
| AipsError (const String &str, Category c=GENERAL) | |
| AipsError (Category c=GENERAL) | |
Protected Attributes | |
| String | message |
| Category | category |
Creates an AipsError and initializes the error message from the parameter.
| casa::AipsError::AipsError | ( | Category | c = GENERAL |
) | [inline] |
| casa::AipsError::~AipsError | ( | ) | throw () |
Destructor which does nothing.
| virtual const char* casa::AipsError::what | ( | ) | const throw () [inline, virtual] |
Simply returns the stored error message.
Definition at line 87 of file Error.h.
References casa::String::c_str(), and message.
| const String& casa::AipsError::getMesg | ( | ) | const [inline] |
| const AipsError::Category casa::AipsError::getCategory | ( | ) | const [inline] |
String casa::AipsError::message [protected] |
Definition at line 109 of file Error.h.
Referenced by getMesg(), casa::MSSelectionError::reset(), and what().
Category casa::AipsError::category [protected] |
1.5.1