summaryrefslogtreecommitdiff
path: root/lib/common/Logging.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/common/Logging.h')
-rw-r--r--lib/common/Logging.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/common/Logging.h b/lib/common/Logging.h
index 9bb2cf6c..35e14d83 100644
--- a/lib/common/Logging.h
+++ b/lib/common/Logging.h
@@ -320,4 +320,23 @@ class FileLogger : public Logger
virtual void SetProgramName(const std::string& rProgramName) { }
};
+class HideExceptionMessageGuard
+{
+ public:
+ HideExceptionMessageGuard()
+ {
+ mOldHiddenState = sHiddenState;
+ sHiddenState = true;
+ }
+ ~HideExceptionMessageGuard()
+ {
+ sHiddenState = mOldHiddenState;
+ }
+ static bool ExceptionsHidden() { return sHiddenState; }
+
+ private:
+ static bool sHiddenState;
+ bool mOldHiddenState;
+};
+
#endif // LOGGING__H