bpp-core3
3.0.0
|
Index out of bounds exception class. More...
#include <Bpp/Exceptions.h>
Public Member Functions | |
IndexOutOfBoundsException (std::string text, std::size_t badInt, std::size_t lowerBound, std::size_t upperBound) | |
Build a new IndexOutOfBoundsException. More... | |
const std::array< std::size_t, 2 > & | getBounds () const |
Get the bounds. More... | |
std::size_t | getBadIndex () const |
const char * | what () const noexcept override |
Method to get the message of the exception (STL method redefinition). More... | |
const std::string & | message () const noexcept |
Access the message as a std::string. More... | |
Private Attributes | |
std::size_t | badIndex_ |
std::array< std::size_t, 2 > | bounds_ |
Index out of bounds exception class.
Definition at line 131 of file Exceptions.h.
bpp::IndexOutOfBoundsException::IndexOutOfBoundsException | ( | std::string | text, |
std::size_t | badInt, | ||
std::size_t | lowerBound, | ||
std::size_t | upperBound | ||
) |
Build a new IndexOutOfBoundsException.
text | A message to be passed to the exception hierarchy. |
badInt | The faulty integer. |
lowerBound | Lower limit. |
upperBound | Upper limit. |
Definition at line 111 of file Exceptions.cpp.
std::size_t bpp::IndexOutOfBoundsException::getBadIndex | ( | ) | const |
Definition at line 119 of file Exceptions.cpp.
References badIndex_.
const std::array< std::size_t, 2 > & bpp::IndexOutOfBoundsException::getBounds | ( | ) | const |
|
noexceptinherited |
Access the message as a std::string.
Definition at line 79 of file Exceptions.cpp.
References bpp::Exception::message_.
|
overridenoexceptinherited |
Method to get the message of the exception (STL method redefinition).
Definition at line 78 of file Exceptions.cpp.
References bpp::Exception::message_.
|
private |
Definition at line 134 of file Exceptions.h.
Referenced by getBadIndex().
|
private |
Definition at line 135 of file Exceptions.h.
Referenced by getBounds().