diff --git a/src/exceptions.h b/src/exceptions.h index 902d1b571..b4d0c021c 100644 --- a/src/exceptions.h +++ b/src/exceptions.h @@ -87,6 +87,11 @@ public: ModError(const std::string &s): BaseException(s) {} }; +class MisbehavedSSCSMException : public BaseException { +public: + MisbehavedSSCSMException(const std::string &s): BaseException(s) {} +}; + /* Some "old-style" interrupts: diff --git a/src/script/sscsm/sscsm_requests.h b/src/script/sscsm/sscsm_requests.h index 39715237e..539ddd6e1 100644 --- a/src/script/sscsm/sscsm_requests.h +++ b/src/script/sscsm/sscsm_requests.h @@ -74,7 +74,7 @@ struct SSCSMRequestLog : public ISSCSMRequest SerializedSSCSMAnswer exec(Client *client) override { if (level >= LL_MAX) { - throw BaseException("Tried to log at non-existent level."); // TODO: choose better exception type + throw MisbehavedSSCSMException("Tried to log at non-existent level."); } else { g_logger.log(level, text); }