Skip to content

vector_pro_exception

C++
class vector_pro_exception: public std::exception;

Exception thrown by vector_pro

When functions in vector_pro are used incorrectly or encounter exceptions, vector_pro_exception will be thrown.

Same as std::exception , you can use vector_pro_exception::what() to obtain further information.

The possible exceptions that may be thrown are described below.

Member functions

name notes
(constructor) constructor (public member function)
(destructor) destructor (public member function)
what get info (public member function)

Possible Exceptions

  1. "Initial size of vector should be geq 0."
    Try to initialize a vector whose size is less than 0.
    Only being thrown by the constructor and the operator=.
  2. "Out of memory."
    Out of mem.
  3. "Target array can't be null."
    When use a null traditional array to initialize the container.
    Only being thrown by the constructor.
  4. "Re_size val of vector should be geq 0."
    Try to resize a vector whose size is less than 0.
  5. "Out of range."
    Try to access a position either when the container is empty or the position itself is out of range.
  6. "Vector is empty."
    Will be thrown by vector_pro::front() , vector_pro::back() , vector_pro::pop() and vector_pro::pop_back() when the container is empty.
  7. "Number of insert target should be geq 0."
    Try to insert (or assign) less than 0 elements into the container.
  8. "Iterator not of this vector."
    Using a wrong iterator to access the current container.
  9. "Iterator not of same vector."
    Will be thrown in functions with the parameters iterator_pro<value_type> from and iterator_pro<value_type> exclude_to.
    The function will first check if the iterators belong to the same container before encountering further issues.
  10. "Vector_pro doesn't support this operation yet. (Maybe in the near future ?)"
    See more in vector_pro::data() .