More reworks of exceptions.
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
|
||||
|
||||
class CreatureException : public std::runtime_error {
|
||||
public:
|
||||
@@ -12,6 +13,6 @@ public:
|
||||
|
||||
#define THROW_CREATURE(message) \
|
||||
std::stringstream ss; \
|
||||
ss << message; \
|
||||
ss << "[" << __FILENAME__ << ", " << __LINE__ << "] " << message; \
|
||||
throw CreatureException(ss.str());
|
||||
#endif // CREATURELIB_CREATUREEXCEPTION_HPP
|
||||
|
||||
Reference in New Issue
Block a user