Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.atnf.csiro.au/computing/software/casacore/casacore-1.2.0/doc/html/classcasa_1_1AipsError.html
Дата изменения: Unknown
Дата индексирования: Mon Feb 14 21:18:37 2011
Кодировка:
casacore: casa::AipsError Class Reference
Public Types | Public Member Functions | Protected Attributes

casa::AipsError Class Reference
[Exceptions_module]

Base class for all AIPS++ library errors. More...

#include <Error.h>

Inheritance diagram for casa::AipsError:
casa::AbortError casa::AllocError casa::ArrayError casa::DataManError casa::DFTError casa::DuplError casa::EmptyStackError casa::FunctionFactoryError casa::HDF5Error casa::IndexError casa::IterError casa::MathFuncError casa::MSSelectionError casa::SortError casa::TableError

List of all members.

Public Types

enum  Category {
  BOUNDARY,
  INITIALIZATION,
  INVALID_ARGUMENT,
  CONFORMANCE,
  ENVIRONMENT,
  SYSTEM,
  PERMISSION,
  GENERAL
}

Public Member Functions

virtual const char * what () const throw ()
 Simply returns the stored error message.
const StringgetMesg () const
AipsError::Category getCategory () const
 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 (const String &msg, const String &filename, uInt lineNumber, Category c=GENERAL)
 AipsError (Category c=GENERAL)
 ~AipsError () throw ()
 Destructor which does nothing.

Protected Attributes

String message
Category category

Detailed Description

Base class for all AIPS++ library errors.

Intended use:

Public interface

Review Status

Reviewed By:
UNKNOWN
Date Reviewed:
before2004/08/25

Prerequisite

Synopsis

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;

Example

         throw(AipsError("SOME STRING"));

Definition at line 75 of file Error.h.


Member Enumeration Documentation

Enumerator:
BOUNDARY 
INITIALIZATION 
INVALID_ARGUMENT 
CONFORMANCE 
ENVIRONMENT 
SYSTEM 
PERMISSION 
GENERAL 

Definition at line 79 of file Error.h.


Constructor & Destructor Documentation

casa::AipsError::AipsError ( const Char str,
Category  c = GENERAL 
)

Creates an AipsError and initializes the error message from the parameter.

casa::AipsError::AipsError ( const String str,
Category  c = GENERAL 
)
casa::AipsError::AipsError ( const String msg,
const String filename,
uInt  lineNumber,
Category  c = GENERAL 
)
casa::AipsError::AipsError ( Category  c = GENERAL  )  [inline]

Definition at line 102 of file Error.h.

casa::AipsError::~AipsError (  )  throw ()

Destructor which does nothing.


Member Function Documentation

AipsError::Category casa::AipsError::getCategory (  )  const [inline]

Definition at line 91 of file Error.h.

References category.

const String& casa::AipsError::getMesg (  )  const [inline]

Definition at line 89 of file Error.h.

References message.

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.


Member Data Documentation

Definition at line 112 of file Error.h.

Referenced by getCategory().

Definition at line 111 of file Error.h.

Referenced by getMesg(), and what().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines