Loading...
Searching...
No Matches
casacore::ArrayIndexError Class Reference
casa package (libcasa_casa) » Arrays_module

An error thrown when an index is out of range. More...

`#include <ArrayError.h>`

## Public Member Functions

| ArrayIndexError ()
| Initialize with the message "ArrayIndexError".
| ArrayIndexError (const char *m)
| Initialize with the supplied message, the index and shape are null.
| ArrayIndexError (const std::string &m)
| Initialize with the supplied message, the index and shape are null.
| ArrayIndexError (const IPosition &index, const IPosition &shape, const char *m="ArrayIndexError")
| Initialize with a given out-of-bounds index, as well as the shape of the array and a supplied message.
| ~ArrayIndexError () noexcept
IPosition | index () const
| The out-of-bounds index.
IPosition | shape () const
| The shape of the violated array.
Public Member Functions inherited from casacore::ArrayError
| ArrayError ()
| Initialize with the message "ArrayError".
| ArrayError (const char *m)
| Initialize with the supplied message.
| ArrayError (const std::string &m)
| Initialize with the supplied message.
| ~ArrayError () noexcept

## Private Attributes

IPosition | i
IPosition | l

## Detailed Description

An error thrown when an index is out of range.

### Review Status

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

The ArrayIndexError class, which is derived from ArrayError, is intended to be thrown when an index is out-of-bounds. It contains within it the offending index, as well as the shape of the array which is being indexed. This should be multiply-derived from indexError<T> defined in Error.h.

Definition at line 79 of file ArrayError.h.

## Constructor & Destructor Documentation

## ArrayIndexError() [1/4]

casacore::ArrayIndexError::ArrayIndexError | ( |  | ) |

Initialize with the message "ArrayIndexError".

## ArrayIndexError() [2/4]

casacore::ArrayIndexError::ArrayIndexError | ( | const char * | m | ) |

Initialize with the supplied message, the index and shape are null.

## ArrayIndexError() [3/4]

casacore::ArrayIndexError::ArrayIndexError | ( | const std::string & | m | ) |

Initialize with the supplied message, the index and shape are null.

## ArrayIndexError() [4/4]

casacore::ArrayIndexError::ArrayIndexError | ( | const IPosition & | index,
|  | const IPosition & | shape,
|  | const char * | m = "ArrayIndexError" )

Initialize with a given out-of-bounds index, as well as the shape of the array and a supplied message.

References index(), and shape().

## ~ArrayIndexError()

casacore::ArrayIndexError::~ArrayIndexError | ( |  | ) |

noexcept

## Member Function Documentation

## index()

IPosition casacore::ArrayIndexError::index | ( |  | ) | const

The out-of-bounds index.

References index().

Referenced by ArrayIndexError(), and index().

## shape()

IPosition casacore::ArrayIndexError::shape | ( |  | ) | const

The shape of the violated array.

References shape().

Referenced by ArrayIndexError(), and shape().

## Member Data Documentation

## i

IPosition casacore::ArrayIndexError::i

private

Definition at line 99 of file ArrayError.h.

## l

IPosition casacore::ArrayIndexError::l

private

Definition at line 99 of file ArrayError.h.

The documentation for this class was generated from the following file:

- casa/Arrays/ArrayError.h