/** * @file throwable.hpp * @brief J Library Throwable ヘッダファイル。 * @copyright 2001 - 2024 Nomura Kei * @depends * j/lang/object.hpp * j/lang/string.hpp */ #ifndef J_LANG_THROWABLE_HPP #define J_LANG_THROWABLE_HPP #include <j/lang/string.hpp> namespace j { namespace lang { class Throwable : public Object { public: // デフォルトコンストラクタ Throwable() noexcept; // コンストラクタ Throwable(const String &msg) noexcept; // コピーコンストラクタ Throwable(const Throwable &t) noexcept; // ムーブコンストラクタ Throwable(Throwable &&t) noexcept; // デストラクタ ~Throwable() noexcept; // コピー代入演算子 Throwable &operator=(const Throwable &t) noexcept; // ムーブ代入演算子 Throwable &operator=(Throwable &&t) noexcept; // エラーメッセージ取得 String getMessage() const noexcept; // 文字列表現取得 String toString() const noexcept override; protected: // クローン std::unique_ptr<Object> clone() const noexcept override; // メッセージ String message; }; } // namespace lang } // namespace j #endif // J_LANG_THROWABLE_HPP