43 #ifndef BPP_NUMERIC_VECTOREXCEPTIONS_H
44 #define BPP_NUMERIC_VECTOREXCEPTIONS_H
49 #include "../Exceptions.h"
88 :
Exception(
"DimensionException (found " + std::to_string(dimension) +
", should be " +
89 std::to_string(correctDimension) +
") " + text)
Exception thrown when a dimension problem occured.
std::size_t correctDimension_
DimensionException(const std::string &text, size_t dimension, size_t correctDimension)
size_t getCorrectDimension() const
size_t getDimension() const
Exception thrown when a given element was not found in the vector.
ElementNotFoundException & operator=(const ElementNotFoundException &)=default
const T * getElement() const
ElementNotFoundException(const std::string &text, const std::vector< T > *vect=nullptr, const T *element=nullptr)
ElementNotFoundException(const ElementNotFoundException &)=default
Exception thrown when an empty vector was found.
EmptyVectorException(const std::string &text, const std::vector< T > *vect=nullptr)
Exception base class. Overload exception constructor (to control the exceptions mechanism)....
General Exception dealing with vectors.
const std::vector< T > * getVector() const
VectorException(const VectorException &)=default
VectorException & operator=(const VectorException &)=default
const std::vector< T > * vect_
VectorException(const std::string &text, const std::vector< T > *vect=nullptr)