bpp-core3  3.0.0
bpp::BadSizeException Class Reference

Wrong size exception class. More...

#include <Bpp/Exceptions.h>

+ Inheritance diagram for bpp::BadSizeException:
+ Collaboration diagram for bpp::BadSizeException:

Public Member Functions

 BadSizeException (std::string text, std::size_t badSize, std::size_t correctSize)
 Build a new BadSizeException. More...
 
std::size_t getBadSize () const
 
std::size_t getCorrectSize () 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 badSize_
 
std::size_t correctSize_
 
std::string message_
 

Detailed Description

Wrong size exception class.

Definition at line 189 of file Exceptions.h.

Constructor & Destructor Documentation

◆ BadSizeException()

bpp::BadSizeException::BadSizeException ( std::string  text,
std::size_t  badSize,
std::size_t  correctSize 
)

Build a new BadSizeException.

Parameters
textA message to be passed to the exception hierarchy.
badSizeThe faulty size.
correctSizeThe expected size.

Definition at line 161 of file Exceptions.cpp.

Member Function Documentation

◆ getBadSize()

std::size_t bpp::BadSizeException::getBadSize ( ) const

Definition at line 166 of file Exceptions.cpp.

References badSize_.

◆ getCorrectSize()

std::size_t bpp::BadSizeException::getCorrectSize ( ) const

Definition at line 167 of file Exceptions.cpp.

References correctSize_.

◆ message()

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

Access the message as a std::string.

Definition at line 119 of file Exceptions.cpp.

References bpp::Exception::message_.

◆ 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 118 of file Exceptions.cpp.

References bpp::Exception::message_.

Member Data Documentation

◆ badSize_

std::size_t bpp::BadSizeException::badSize_
private

Definition at line 192 of file Exceptions.h.

Referenced by getBadSize().

◆ correctSize_

std::size_t bpp::BadSizeException::correctSize_
private

Definition at line 193 of file Exceptions.h.

Referenced by getCorrectSize().

◆ message_

std::string bpp::Exception::message_
privateinherited

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