Arkulib
NegativeSqrtException.hpp
Go to the documentation of this file.
1
9#pragma once
10
11#include <stdexcept>
12
13namespace Arkulib::Exceptions {
17 class NegativeSqrtException : public std::runtime_error {
18 public:
19 inline NegativeSqrtException() : std::runtime_error("The rational must not be negative when calling sqrt().") {}
20 };
21}
An exception to handle call of sqrt() when the rational is negative.