mirror of
https://github.com/libAthena/athena.git
synced 2025-12-09 13:38:03 +00:00
* Add Variadic arguments to THROW_* macros
This commit is contained in:
@@ -43,7 +43,10 @@ public:
|
||||
} // error
|
||||
} // Athena
|
||||
|
||||
#define THROW_INVALID_DATA_EXCEPTION(msg) \
|
||||
do { throw Athena::error::InvalidDataException("InvalidDataException: " msg, __FILE__, __PRETTY_FUNCTION__, __LINE__); } while(0)
|
||||
#define THROW_INVALID_DATA_EXCEPTION(args...) \
|
||||
do { \
|
||||
std::string msg = Athena::utility::sprintf(args); \
|
||||
throw Athena::error::InvalidDataException(std::string("InvalidDataException: ")+msg, __FILE__, __PRETTY_FUNCTION__, __LINE__); \
|
||||
} while(0)
|
||||
|
||||
#endif // INVALIDDATAEXCEPTION_HPP
|
||||
|
||||
Reference in New Issue
Block a user