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:
parent
0ccbc283ad
commit
95573ef2f7
2 changed files with 6 additions and 1 deletions
|
@ -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:
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue