summaryrefslogtreecommitdiff
path: root/lib/common/Logging.cpp
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2012-04-28 18:18:59 +0000
committerChris Wilson <chris+github@qwirx.com>2012-04-28 18:18:59 +0000
commit7b5f339fa350511457d84273dc2b122b161a8811 (patch)
tree0f1fdebeb4ea5f313773f4c8f8cf0b489e2002aa /lib/common/Logging.cpp
parent5818dd9c8233d1454a5f8284ba437ea2f77ee626 (diff)
Allow hiding specific exceptions to keep test output cleaner.
Diffstat (limited to 'lib/common/Logging.cpp')
-rw-r--r--lib/common/Logging.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/common/Logging.cpp b/lib/common/Logging.cpp
index f0cf74b4..7674115e 100644
--- a/lib/common/Logging.cpp
+++ b/lib/common/Logging.cpp
@@ -46,6 +46,9 @@ Log::Level Logging::sGlobalLevel = Log::EVERYTHING;
Logging Logging::sGlobalLogging; //automatic initialisation
std::string Logging::sProgramName;
+HideSpecificExceptionGuard::SuppressedExceptions_t
+ HideSpecificExceptionGuard::sSuppressedExceptions;
+
int Logging::Guard::sGuardCount = 0;
Log::Level Logging::Guard::sOriginalLevel = Log::INVALID;
@@ -538,3 +541,18 @@ std::string PrintEscapedBinaryData(const std::string& rInput)
return output.str();
}
+
+bool HideSpecificExceptionGuard::IsHidden(int type, int subtype)
+{
+ for (SuppressedExceptions_t::iterator
+ i = sSuppressedExceptions.begin();
+ i != sSuppressedExceptions.end(); i++)
+ {
+ if(i->first == type && i->second == subtype)
+ {
+ return true;
+ }
+ }
+ return false;
+}
+