MoCSI API Reference
Loading...
Searching...
No Matches
Public Member Functions | List of all members
MatrixOutOfBoundsError Class Reference

Error class to throw when the matrix is accessed out of bounds. Inherits from std::exception. More...

#include <GenericMatrix.h>

Inheritance diagram for MatrixOutOfBoundsError:
Inheritance graph
Collaboration diagram for MatrixOutOfBoundsError:
Collaboration graph

Public Member Functions

 MatrixOutOfBoundsError (int access_row, int access_col, int rows, int cols, const std::string &tag)
 Constructor for the MatrixErrorOutOfBounds class. Builds the error message and saves it to the member variable m_error_string.
 
const charwhat () const noexcept override
 Supplies the error message as a c-style string/char array.
 
 ~MatrixOutOfBoundsError () override=default
 

Detailed Description

Error class to throw when the matrix is accessed out of bounds. Inherits from std::exception.

Constructor & Destructor Documentation

◆ MatrixOutOfBoundsError()

MatrixOutOfBoundsError::MatrixOutOfBoundsError ( int  access_row,
int  access_col,
int  rows,
int  cols,
const std::string &  tag 
)
inline

Constructor for the MatrixErrorOutOfBounds class. Builds the error message and saves it to the member variable m_error_string.

Parameters
access_rowThe row number that was tried to access.
access_colThe colums number that was tried to access.
rowsThe actual row number of the matrix object that was tried to access.
rowsThe actual column number of the matrix object that was tried to access.

◆ ~MatrixOutOfBoundsError()

MatrixOutOfBoundsError::~MatrixOutOfBoundsError ( )
overridedefault

Member Function Documentation

◆ what()

const char * MatrixOutOfBoundsError::what ( ) const
inlineoverridenoexcept

Supplies the error message as a c-style string/char array.


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