bpp-core3  3.0.0
bpp::VectorException< T > Class Template Reference

General Exception dealing with vectors. More...

#include <Bpp/Numeric/VectorExceptions.h>

+ Inheritance diagram for bpp::VectorException< T >:
+ Collaboration diagram for bpp::VectorException< T >:

Public Member Functions

 VectorException (const std::string &text, const std::vector< T > *vect=nullptr)
 
 VectorException (const VectorException &)=default
 
VectorExceptionoperator= (const VectorException &)=default
 
const std::vector< T > * getVector () 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...
 

Protected Attributes

const std::vector< T > * vect_
 

Detailed Description

template<class T>
class bpp::VectorException< T >

General Exception dealing with vectors.

Definition at line 17 of file VectorExceptions.h.

Constructor & Destructor Documentation

◆ VectorException() [1/2]

template<class T >
bpp::VectorException< T >::VectorException ( const std::string &  text,
const std::vector< T > *  vect = nullptr 
)
inline

Definition at line 23 of file VectorExceptions.h.

References bpp::VectorException< T >::operator=().

◆ VectorException() [2/2]

template<class T >
bpp::VectorException< T >::VectorException ( const VectorException< T > &  )
default

Member Function Documentation

◆ getVector()

template<class T >
const std::vector<T>* bpp::VectorException< T >::getVector ( ) const
inline

Definition at line 29 of file VectorExceptions.h.

References bpp::VectorException< T >::vect_.

◆ message()

const std::string & bpp::Exception::message ( ) const
noexceptinherited

Access the message as a std::string.

Definition at line 79 of file Exceptions.cpp.

References bpp::Exception::message_.

◆ operator=()

◆ what()

const char * bpp::Exception::what ( ) const
overridenoexceptinherited

Method to get the message of the exception (STL method redefinition).

Returns
The message passed to the exception hierarchy.

Definition at line 78 of file Exceptions.cpp.

References bpp::Exception::message_.

Member Data Documentation

◆ vect_

template<class T >
const std::vector<T>* bpp::VectorException< T >::vect_
protected

Definition at line 20 of file VectorExceptions.h.

Referenced by bpp::VectorException< T >::getVector().


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