5 #ifndef BPP_NUMERIC_VECTOREXCEPTIONS_H 6 #define BPP_NUMERIC_VECTOREXCEPTIONS_H 11 #include "../Exceptions.h" 50 :
Exception(
"DimensionException (found " +
std::to_string(dimension) +
", should be " +
51 std::to_string(correctDimension) +
") " + text)
52 , dimension_(dimension)
53 , correctDimension_(correctDimension){}
77 #endif // BPP_NUMERIC_VECTOREXCEPTIONS_H
const T * getElement() const
Exception thrown when a given element was not found in the vector.
EmptyVectorException(const std::string &text, const std::vector< T > *vect=nullptr)
VectorException & operator=(const VectorException &)=default
const std::vector< T > * vect_
size_t getCorrectDimension() const
size_t getDimension() const
Exception thrown when an empty vector was found.
std::size_t correctDimension_
General Exception dealing with vectors.
Exception base class. Overload exception constructor (to control the exceptions mechanism). Destructor is already virtual (from std::exception)
ElementNotFoundException(const std::string &text, const std::vector< T > *vect=nullptr, const T *element=nullptr)
VectorException(const std::string &text, const std::vector< T > *vect=nullptr)
const std::vector< T > * getVector() const
DimensionException(const std::string &text, size_t dimension, size_t correctDimension)
Exception thrown when a dimension problem occured.