Cantera  2.0
Public Member Functions | Protected Attributes | Private Attributes | List of all members
IndexError Class Reference

An array index is out of range. More...

#include <ctexceptions.h>

Inheritance diagram for IndexError:
[legend]
Collaboration diagram for IndexError:
[legend]

Public Member Functions

 IndexError (std::string func, std::string arrayName, size_t m, size_t mmax)
 Constructor.
 
virtual std::string getMessage () const
 Method overridden by derived classes to formatted the error message.
 
virtual std::string getClass () const
 Method overridden by derived classes to indicate their type.
 
const char * what () const throw ()
 Get a description of the error.
 
void save ()
 Function to put this error onto Cantera's error stack.
 

Protected Attributes

std::string procedure_
 The name of the procedure where the exception occurred.
 

Private Attributes

std::string arrayName_
 
size_t m_
 
size_t mmax_
 

Detailed Description

An array index is out of range.

Definition at line 151 of file ctexceptions.h.

Constructor & Destructor Documentation

IndexError ( std::string  func,
std::string  arrayName,
size_t  m,
size_t  mmax 
)
inline

Constructor.

This class indicates an out-of-bounds array index.

Parameters
funcString name for the function within which the error was generated.
mThis is the value of the out-of-bounds index.
mmaxThis is the maximum allowed value of the index. The minimum allowed value is assumed to be 0.

Definition at line 164 of file ctexceptions.h.

Member Function Documentation

std::string getMessage ( ) const
virtual

Method overridden by derived classes to formatted the error message.

Reimplemented from CanteraError.

Definition at line 66 of file ctexceptions.cpp.

virtual std::string getClass ( ) const
inlinevirtual

Method overridden by derived classes to indicate their type.

Reimplemented from CanteraError.

Definition at line 169 of file ctexceptions.h.

const char * what ( ) const throw ()
inherited
void save ( )
inherited

Member Data Documentation

std::string procedure_
protectedinherited

The name of the procedure where the exception occurred.

Definition at line 107 of file ctexceptions.h.

Referenced by CanteraError::save(), and CanteraError::what().


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