5 #ifndef BPP_EXCEPTIONS_H 6 #define BPP_EXCEPTIONS_H 32 Exception(std::string text,
int stack = 10);
36 const char*
what() const noexcept override;
91 int getBadInteger()
const;
109 double getBadNumber()
const;
127 const std::string& getBadNumber()
const;
146 const std::array<std::size_t, 2>& getBounds()
const;
147 std::size_t getBadIndex()
const;
163 BadSizeException(std::string text, std::size_t badSize, std::size_t correctSize);
165 std::size_t getBadSize()
const;
166 std::size_t getCorrectSize()
const;
183 OutOfRangeException(std::string text,
double badValue,
double lowerBound,
double upperBound);
185 double getBadValue ()
const;
186 double getLowerBound()
const;
187 double getUpperBound()
const;
200 #endif // BPP_EXCEPTIONS_H Number exception: doubles.
const std::string & message() const noexcept
Access the message as a std::string.
The base class exception for zero division error.
The base class exception for IO error.
Exception(std::string text, int stack=10)
Build a new Exception.
const char * what() const noexcept override
Method to get the message of the exception (STL method redefinition).
Number exception: integers.
std::array< double, 2 > bounds_
Wrong size exception class.
This exception is sent when a given method is not implemented.
std::array< std::size_t, 2 > bounds_
The base class exception for NULL pointer error. This exception may be thrown when an unexpected NULL...
Out of range exception class.
Exception base class. Overload exception constructor (to control the exceptions mechanism). Destructor is already virtual (from std::exception)
Index out of bounds exception class.