diff options
author | Chris Wilson <chris+github@qwirx.com> | 2010-02-22 21:55:42 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2010-02-22 21:55:42 +0000 |
commit | 02835ffb3b9212ea643bdd43565c842b3ad56199 (patch) | |
tree | 4b9953814f296582b868ee54f834a4a4272fc2ac /lib/common | |
parent | b83b5d27cc1e4dd0827fa4afbe7f3cd9ba0908f8 (diff) |
Rename LOG_AND_THROW_ERROR macro to THROW_SYS_ERROR for consistency and
brevity. Add THROW_SYS_FILE_ERROR which adds a filename to the message.
Diffstat (limited to 'lib/common')
-rw-r--r-- | lib/common/Logging.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/common/Logging.h b/lib/common/Logging.h index 24863d2c..6ffeec5d 100644 --- a/lib/common/Logging.h +++ b/lib/common/Logging.h @@ -51,10 +51,13 @@ #define BOX_LOG_SYS_FATAL(stuff) \ BOX_FATAL(BOX_SYS_ERROR(stuff)) -#define LOG_AND_THROW_ERROR(message, filename, exception, subtype) \ - BOX_LOG_SYS_ERROR(message << ": " << filename); \ +#define THROW_SYS_ERROR(message, exception, subtype) \ + BOX_LOG_SYS_ERROR(message); \ THROW_EXCEPTION_MESSAGE(exception, subtype, \ - BOX_SYS_ERROR(message << ": " << filename)); + BOX_SYS_ERROR(message)) + +#define THROW_SYS_FILE_ERROR(message, filename, exception, subtype) \ + THROW_SYS_ERROR(message << ": " << filename, exception, subtype) inline std::string GetNativeErrorMessage() { |