Cantera 2.6.0

Public Member Functions | Private Attributes | List of all members
ArraySizeError Class Reference
Error Handling

Array size error. More...

`#include <ctexceptions.h>`

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

## Public Member Functions
| ArraySizeError (const std::string &procedure, size_t sz, size_t reqd)
| Constructor. More...
virtual std::string | getMessage () const
| Method overridden by derived classes to format the error message. More...
virtual std::string | getClass () const
| Method overridden by derived classes to indicate their type. More...
Public Member Functions inherited from CanteraError
template<typename... Args>
| CanteraError (const std::string &procedure, const std::string &msg, const Args &... args)
| Normal Constructor for the CanteraError base class. More...
virtual | ~CanteraError () throw ()
| Destructor for base class does nothing. More...
const char * | what () const throw ()
| Get a description of the error. More...
virtual std::string | getMessage () const
| Method overridden by derived classes to format the error message. More...
virtual std::string | getClass () const
| Method overridden by derived classes to indicate their type. More...

## Private Attributes
size_t | sz_
size_t | reqd_

## Additional Inherited Members
Protected Member Functions inherited from CanteraError
| CanteraError ()
| Protected default constructor discourages throwing errors containing no information. More...
| CanteraError (const std::string &procedure)
| Constructor used by derived classes that override getMessage() More...
Protected Attributes inherited from CanteraError
std::string | procedure_
| The name of the procedure where the exception occurred. More...
std::string | formattedMessage_
| Formatted message returned by what() More...

## Detailed Description

Array size error.

This error is thrown if a supplied length to a vector supplied to Cantera is too small.

Definition at line 127 of file ctexceptions.h.

## Constructor & Destructor Documentation

## ◆ ArraySizeError()

ArraySizeError | ( | const std::string & | procedure,
|  | size_t | sz,
|  | size_t | reqd
| ) |  |
| inline

Constructor.

The length needed is supplied by the argument, reqd, and the length supplied is given by the argument sz.

Parameters

  procedure | String name for the function within which the error was generated.
  sz | This is the length supplied to Cantera.
  reqd | This is the required length needed by Cantera

Definition at line 140 of file ctexceptions.h.

## Member Function Documentation

## ◆ getMessage()

std::string getMessage | ( |  | ) | const
| virtual

Method overridden by derived classes to format the error message.

Reimplemented from CanteraError.

Definition at line 50 of file ctexceptions.cpp.

## ◆ getClass()

virtual std::string getClass | ( |  | ) | const
| inline virtual

Method overridden by derived classes to indicate their type.

Reimplemented from CanteraError.

Definition at line 144 of file ctexceptions.h.

## Member Data Documentation

## ◆ sz_

size_t sz_
| private

Definition at line 149 of file ctexceptions.h.

## ◆ reqd_

size_t reqd_
| private

Definition at line 149 of file ctexceptions.h.

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

- ctexceptions.h
- ctexceptions.cpp