From befcf12820411ace8d9531dc829abd20c957fe60 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sun, 28 Dec 2014 16:04:47 -0500 Subject: fix compile time warnings for unreachable code --- pulse.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'pulse.h') diff --git a/pulse.h b/pulse.h index 55b07c3..32dfe25 100644 --- a/pulse.h +++ b/pulse.h @@ -7,6 +7,7 @@ // C++ #include +#include #include #include @@ -260,4 +261,13 @@ class PulseClient { unique_ptr notifier_; }; +class unreachable : public std::runtime_error { + public: + unreachable() throw() : + std::runtime_error("unreachable code path encountered") {} + + unreachable(const std::string& message) throw() : + std::runtime_error(message) {} +}; + // vim: set et ts=2 sw=2: -- cgit v1.2.3