CCfits  2.6
Public Member Functions | List of all members
CCfits::Table::NoSuchColumn Class Reference

Exception to be thrown on a failure to retrieve a column specified either by name or index number. More...

#include <Table.h>

Inheritance diagram for CCfits::Table::NoSuchColumn:
CCfits::FitsException

Public Member Functions

 NoSuchColumn (const String &name, bool silent=true)
 Exception ctor for exception thrown if the requested column (specified by name) is not present. More...
 
 NoSuchColumn (int index, bool silent=true)
 Exception ctor for exception thrown if the requested column (specified by name) is not present. More...
 
- Public Member Functions inherited from CCfits::FitsException
 FitsException (const string &msg, bool &silent)
 
const string & message () const
 returns the error message More...
 

Detailed Description

Exception to be thrown on a failure to retrieve a column specified either by name or index number.

When a Table object is created, the header is read and a column object created for each column defined. Thus id this exception is thrown the column requested does not exist in the HDU (note that the column can easily exist and not contain any data since the user controls whether the column will be read when the FITS object is instantiated).

It is expected that the index number calls will be primarily internal. The underlying implementation makes lookup by name more efficient.

The exception has two variants, which take either an integer or a string as parameter. These are used according to the accessor that threw them, either by name or index.

Constructor & Destructor Documentation

◆ NoSuchColumn() [1/2]

CCfits::Table::NoSuchColumn::NoSuchColumn ( const String &  name,
bool  silent = true 
)

Exception ctor for exception thrown if the requested column (specified by name) is not present.

Message: Fits Error: cannot find Column named: name is printed.

Parameters
namethe requested column name
silentif true, print message whether FITS::verboseMode is set or not.

◆ NoSuchColumn() [2/2]

CCfits::Table::NoSuchColumn::NoSuchColumn ( int  index,
bool  silent = true 
)

Exception ctor for exception thrown if the requested column (specified by name) is not present.

Message: Fits Error: column not present - Column number index is printed.

Parameters
indexthe requested column number
silentif true, print message whether FITS::verboseMode is set or not.

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