#pragma once #include "../common/std.hpp" #include "../common/UsefulException.hpp" namespace ougge::gui { #define SDLException() SDLException_(__FILE__, __func__, __LINE__) class SDLException_ : public UsefulException_ { public: SDLException_(const std::string& _file, const std::string& _func, int line_n); }; #define IMGException() IMGException_(__FILE__, __func__, __LINE__) class IMGException_ : public UsefulException_ { public: IMGException_(const std::string& _file, const std::string& _func, int line_n); }; #define SDL_TRY(EXPR) if(EXPR) throw ::ougge::gui::SDLException(); }