soo
3D game math library
Loading...
Searching...
No Matches
exception.h
1// By notchcamo.
2
3#pragma once
4
5#include <exception>
6#include <string>
7#include <utility>
8
13{
14 class DivisionByZero final : public std::exception
15 {
16 private:
17 std::string msg;
18
19 public:
20 explicit DivisionByZero(std::string str = "Division by zero.") : msg(std::move(str)) {}
21 const char* what() const noexcept override { return msg.c_str(); }
22 };
23} // namespace soo::exception.
Namespace for custom exceptions.
Definition exception.h:13