- new exception class for quitting the game

This will eventually replace the atexit mess, right now it isn't used.
This commit is contained in:
Christoph Oelckers 2019-10-01 00:43:12 +02:00
parent e7c388dccd
commit 12440bbca3

View file

@ -111,6 +111,18 @@ public:
CVulkanError(const char *message) : CDoomError(message) {}
};
class CExitEvent : public std::exception
{
int m_reason;
public:
CExitEvent(int reason) { m_reason = reason; }
char const *what() const noexcept override
{
return "The game wants to exit";
}
int Reason() const { return m_reason; }
};
void I_Error (const char *error, ...) GCCPRINTF(1,2);
void I_FatalError (const char *error, ...) GCCPRINTF(1,2);