More clearer exception messages.
This commit is contained in:
@@ -17,4 +17,12 @@ public:
|
||||
___ss << "[" << __FILENAME__ << ":" << __LINE__ << "] " << message; \
|
||||
throw CreatureException(___ss.str());
|
||||
|
||||
#define try_creature(data, msg) \
|
||||
try { \
|
||||
data; \
|
||||
} catch (const CreatureException& e) { \
|
||||
throw e; \
|
||||
} catch (const std::exception& e) { \
|
||||
THROW_CREATURE(msg << ": '" << e.what() << "'."); \
|
||||
}
|
||||
#endif // CREATURELIB_CREATUREEXCEPTION_HPP
|
||||
|
||||
Reference in New Issue
Block a user