summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2010-03-18 21:38:45 +0000
committerChris Wilson <chris+github@qwirx.com>2010-03-18 21:38:45 +0000
commit70c19c9ebb86ad8a252b78e0e7630ba829bc05cc (patch)
tree3fb7a57454c16f63eef7c4f78a698bfa06b583aa
parente33132bec159ba16da0335a476f60ee2d71f15e0 (diff)
Add a new exception macro for throwing exceptions that are related to a
file but not system errors.
-rw-r--r--lib/common/Logging.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/common/Logging.h b/lib/common/Logging.h
index 6ffeec5d..86d37c22 100644
--- a/lib/common/Logging.h
+++ b/lib/common/Logging.h
@@ -59,6 +59,10 @@
#define THROW_SYS_FILE_ERROR(message, filename, exception, subtype) \
THROW_SYS_ERROR(message << ": " << filename, exception, subtype)
+#define THROW_FILE_ERROR(message, filename, exception, subtype) \
+ BOX_ERROR(message << ": " << filename); \
+ THROW_EXCEPTION_MESSAGE(exception, subtype, message << ": " << filename);
+
inline std::string GetNativeErrorMessage()
{
#ifdef WIN32