From 06f9a85eb598cd2bdc985da4aa3ca69e8bbdf6d8 Mon Sep 17 00:00:00 2001 From: Tristan Matthews <tristan.matthews@savoirfairelinux.com> Date: Tue, 28 Jun 2011 14:07:53 -0400 Subject: [PATCH] * #6288: simplify SdpException --- sflphone-common/src/sip/sdp.h | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/sflphone-common/src/sip/sdp.h b/sflphone-common/src/sip/sdp.h index fe1675ba6b..bb1fc58de4 100644 --- a/sflphone-common/src/sip/sdp.h +++ b/sflphone-common/src/sip/sdp.h @@ -42,7 +42,7 @@ #include <pj/assert.h> #include <vector> #include <string> -#include <exception> +#include <stdexcept> #include "global.h" // FIXME: CodecOrder shouldn't be in global.h class sdpMedia; @@ -51,20 +51,11 @@ namespace sfl { class AudioCodec; } -class SdpException : public std::exception +class SdpException : public std::runtime_error { public: - SdpException (const std::string& str="") throw() : errstr (str) {} - - virtual ~SdpException() throw() {} - - virtual const char *what() const throw() { - std::string expt ("SDP: SdpException occured: "); - expt.append (errstr); - return expt.c_str(); - } - private: - std::string errstr; + SdpException (const std::string& str="") : + std::runtime_error("SDP: SdpException occured: " + str) {} }; typedef std::vector<std::string> CryptoOffer; -- GitLab