A simple scripting language in C++
Ferenc Szontágh
2025-04-19 55abb4f6f81fc370e349385b38dffb05fa9d5dcb
src/Modules/BaseModule.hpp
@@ -3,6 +3,8 @@
#define MODULES_BASEMODULE_HPP
// Base exception type for module errors
#include "../BaseException.hpp"
namespace Modules {
/**
@@ -20,5 +22,19 @@
    virtual void registerModule() = 0;
};
/**
 * @brief Exception type for errors thrown within module functions.
 * Inherit from BaseException to allow rich error messages.
 */
class Exception : public ::BaseException {
  public:
    /**
     * Construct a module exception with a message.
     * @param msg Error message
     */
    explicit Exception(const std::string & msg)
        : BaseException(msg) {}
};
} // namespace Modules
#endif // MODULES_BASEMODULE_HPP