From a4fad56638483aa95017f3842bac493ede4f31bd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafa=C3=ABl=20Carr=C3=A9?=
 <rafael.carre@savoirfairelinux.com>
Date: Thu, 28 Jul 2011 15:42:11 -0400
Subject: [PATCH] * #6547 : remove unused exceptions

---
 .../audio/audiortp/AudioRtpRecordHandler.h    |  7 -------
 .../src/audio/audiortp/AudioSrtpSession.h     |  7 -------
 .../src/audio/audiortp/ZrtpSessionCallback.h  |  7 -------
 sflphone-common/src/config/yamlengine.h       |  8 -------
 sflphone-common/src/config/yamlnode.h         | 21 +------------------
 sflphone-common/src/sip/sipaccount.h          | 18 ----------------
 sflphone-common/src/sip/sipvoiplink.h         | 16 --------------
 7 files changed, 1 insertion(+), 83 deletions(-)

diff --git a/sflphone-common/src/audio/audiortp/AudioRtpRecordHandler.h b/sflphone-common/src/audio/audiortp/AudioRtpRecordHandler.h
index c348184497..cc8c638191 100644
--- a/sflphone-common/src/audio/audiortp/AudioRtpRecordHandler.h
+++ b/sflphone-common/src/audio/audiortp/AudioRtpRecordHandler.h
@@ -71,13 +71,6 @@ timeval2microtimeout (const timeval& t)
     return ( (t.tv_sec * 1000000ul) + t.tv_usec);
 }
 
-class AudioRtpSessionException: public std::exception
-{
-    virtual const char* what() const throw() {
-        return "AudioRtpSessionException occured";
-    }
-};
-
 typedef struct DtmfEvent {
     ost::RTPPacket::RFC2833Payload payload;
     int factor;
diff --git a/sflphone-common/src/audio/audiortp/AudioSrtpSession.h b/sflphone-common/src/audio/audiortp/AudioSrtpSession.h
index 2d8d79a5aa..86c2718ca8 100644
--- a/sflphone-common/src/audio/audiortp/AudioSrtpSession.h
+++ b/sflphone-common/src/audio/audiortp/AudioSrtpSession.h
@@ -66,13 +66,6 @@ class SIPCall;
 namespace sfl
 {
 
-class SrtpException: public std::exception
-{
-        virtual const char* what() const throw() {
-            return "ZRTP ZID initialization failed.";
-        }
-};
-
 class AudioSrtpSession : public AudioRtpSession
 {
     public:
diff --git a/sflphone-common/src/audio/audiortp/ZrtpSessionCallback.h b/sflphone-common/src/audio/audiortp/ZrtpSessionCallback.h
index c9d2acadff..bdd26e7db2 100644
--- a/sflphone-common/src/audio/audiortp/ZrtpSessionCallback.h
+++ b/sflphone-common/src/audio/audiortp/ZrtpSessionCallback.h
@@ -46,13 +46,6 @@ class DBusManagerImpl;
 namespace sfl
 {
 
-class ZrtpSessionCallbackException: public std::exception
-{
-        virtual const char* what() const throw() {
-            return "An exception occured while being in a zrtp callback\n";
-        }
-};
-
 class ZrtpSessionCallback: public ZrtpUserCallback
 {
     public:
diff --git a/sflphone-common/src/config/yamlengine.h b/sflphone-common/src/config/yamlengine.h
index d1ba6965c6..00b1a4bc27 100644
--- a/sflphone-common/src/config/yamlengine.h
+++ b/sflphone-common/src/config/yamlengine.h
@@ -40,14 +40,6 @@
 namespace Conf
 {
 
-class YamlEngineException : public std::exception
-{
-
-        virtual const char *what() const throw() {
-            return "YamlEngineException occured";
-        }
-};
-
 class YamlEngine : public Engine
 {
 
diff --git a/sflphone-common/src/config/yamlnode.h b/sflphone-common/src/config/yamlnode.h
index 03ef54266f..ebfab90f77 100644
--- a/sflphone-common/src/config/yamlnode.h
+++ b/sflphone-common/src/config/yamlnode.h
@@ -34,7 +34,7 @@
 #include <string>
 #include <list>
 #include <map>
-#include <exception>
+#include <stdexcept>
 
 namespace Conf
 {
@@ -45,25 +45,6 @@ class YamlNode;
 typedef std::list<YamlNode *> Sequence;
 typedef std::map<std::string, YamlNode *> Mapping;
 
-class YamlNodeException : public std::exception
-{
-
-    public:
-        YamlNodeException (const std::string& str="") throw() : errstr (str) {}
-
-        virtual ~YamlNodeException() throw() {}
-
-        virtual const char *what() const throw() {
-            std::string expt ("YamlNodeException occured: ");
-            expt.append (errstr);
-
-            return expt.c_str();
-        }
-    private:
-        std::string errstr;
-
-};
-
 enum NodeType { DOCUMENT, SCALAR, MAPPING, SEQUENCE };
 
 class YamlNode
diff --git a/sflphone-common/src/sip/sipaccount.h b/sflphone-common/src/sip/sipaccount.h
index 97897d18b6..de1ddfb4af 100644
--- a/sflphone-common/src/sip/sipaccount.h
+++ b/sflphone-common/src/sip/sipaccount.h
@@ -105,24 +105,6 @@ class SIPVoIPLink;
  * @brief A SIP Account specify SIP specific functions and object (SIPCall/SIPVoIPLink)
  */
 
-class SipAccountException : public std::exception
-{
-    public:
-        SipAccountException (const std::string& str="") throw() : errstr (str) {}
-
-        virtual ~SipAccountException() throw() {}
-
-        virtual const char *what() const throw() {
-            std::string expt ("SipAccountException occured: ");
-            expt.append (errstr);
-
-            return expt.c_str();
-        }
-    private:
-        std::string errstr;
-
-};
-
 class CredentialItem
 {
     public:
diff --git a/sflphone-common/src/sip/sipvoiplink.h b/sflphone-common/src/sip/sipvoiplink.h
index f08be6fc25..f0b22eaa89 100644
--- a/sflphone-common/src/sip/sipvoiplink.h
+++ b/sflphone-common/src/sip/sipvoiplink.h
@@ -62,22 +62,6 @@ class SIPCall;
 // To set the verbosity. From 0 (min) to 6 (max)
 #define PJ_LOG_LEVEL 0
 
-class SIPVoipLinkException : public std::exception
-{
-    public:
-        SIPVoipLinkException (const std::string& str="") throw() : errstr (str) {}
-
-        virtual ~SIPVoipLinkException() throw() {}
-
-        virtual const char *what() const throw() {
-            std::string expt ("UserAgent: SIPVoipLinkException occured: ");
-            expt.append (errstr);
-            return expt.c_str();
-        }
-    private:
-        std::string errstr;
-};
-
 /**
  * @file sipvoiplink.h
  * @brief Specific VoIPLink for SIP (SIP core for incoming and outgoing events).
-- 
GitLab