1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

add MisbehavedSSCSMException type

This commit is contained in:
Desour 2025-03-24 13:07:33 +01:00
parent 0ccbc283ad
commit 95573ef2f7
2 changed files with 6 additions and 1 deletions

View file

@ -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:

View file

@ -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);
}