Skip to content
Permalink
Browse files

- new exception class for quitting the game

This will eventually replace the atexit mess, right now it isn't used.
  • Loading branch information...
coelckers committed Sep 30, 2019
1 parent e7c388d commit 12440bbca3d599362af50ec0333b6bbe358e37be
Showing with 12 additions and 0 deletions.
  1. +12 −0 src/utility/doomerrors.h
@@ -111,6 +111,18 @@ class CVulkanError : public CDoomError
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);

0 comments on commit 12440bb

Please sign in to comment.
You can’t perform that action at this time.