44 #ifndef BPP_EXCEPTIONS_H
45 #define BPP_EXCEPTIONS_H
70 Exception(std::string text,
int stack = 10);
74 const char*
what() const noexcept override;
76 const std::
string&
message() const noexcept;
129 int getBadInteger()
const;
147 double getBadNumber()
const;
165 const std::string& getBadNumber()
const;
184 const std::array<std::size_t, 2>& getBounds()
const;
185 std::size_t getBadIndex()
const;
201 BadSizeException(std::string text, std::size_t badSize, std::size_t correctSize);
203 std::size_t getBadSize()
const;
204 std::size_t getCorrectSize()
const;
221 OutOfRangeException(std::string text,
double badValue,
double lowerBound,
double upperBound);
223 double getBadValue ()
const;
224 double getLowerBound()
const;
225 double getUpperBound()
const;
Number exception: integers.
Number exception: doubles.
Wrong size exception class.
Exception base class. Overload exception constructor (to control the exceptions mechanism)....
const char * what() const noexcept override
Method to get the message of the exception (STL method redefinition).
const std::string & message() const noexcept
Access the message as a std::string.
Exception(std::string text, int stack=10)
Build a new Exception.
The base class exception for IO error.
Index out of bounds exception class.
std::array< std::size_t, 2 > bounds_
This exception is sent when a given method is not implemented.
The base class exception for NULL pointer error. This exception may be thrown when an unexpected NULL...
Out of range exception class.
std::array< double, 2 > bounds_
The base class exception for zero division error.