Newer
Older
c-interpreter / include / kcpp_throwable.hpp
Nomura Kei on 9 Aug 2023 661 bytes UPDATE
////////////////////////////////////////////////////////////////////////////////
//
// Throwable
//
#ifndef KCPP_THROWABLE_HPP
#define KCPP_THROWABLE_HPP

#include <exception>
#include <string>

#include <kcpp.hpp>

namespace kcpp
{
	/**
	 * kcpp で扱う例外規定クラス。
	 */
	class Throwable : public std::exception
	{
		public:
			Throwable() noexcept;
			Throwable(const Throwable& t) noexcept;
			Throwable(const std::string& msg) noexcept;
			virtual ~Throwable() noexcept;
			virtual const char* what() const noexcept;
		protected:
			Throwable& operator=(const Throwable& t) = delete;
			std::string message;
	};
}
#endif	// KCPP_THROWABLE_HPP