diff --git a/sflphone-common/src/audio/sound/dtmfgenerator.cpp b/sflphone-common/src/audio/sound/dtmfgenerator.cpp index 82f898b7223f4f9225c26212781e42c6651196d2..474d25aea96584faf5bb14d75722f5ce84ad907d 100644 --- a/sflphone-common/src/audio/sound/dtmfgenerator.cpp +++ b/sflphone-common/src/audio/sound/dtmfgenerator.cpp @@ -62,22 +62,6 @@ const DTMFGenerator::DTMFTone DTMFGenerator::tones[NUM_TONES] = { }; -DTMFException::DTMFException (const char* _reason) throw() : reason (_reason) -{ -} - - -DTMFException::~DTMFException() throw() -{ -} - -const char* DTMFException::what() const throw() -{ - return reason; -} - - - /* * Initialize the generator */ diff --git a/sflphone-common/src/audio/sound/dtmfgenerator.h b/sflphone-common/src/audio/sound/dtmfgenerator.h index 1055f6f8cc5eb8610d7b4f7372a8ec6d8a8d1a11..ebf50bba5bc434125b35b6b90b03c335d78691dd 100644 --- a/sflphone-common/src/audio/sound/dtmfgenerator.h +++ b/sflphone-common/src/audio/sound/dtmfgenerator.h @@ -36,7 +36,7 @@ #ifndef DTMFGENERATOR_H #define DTMFGENERATOR_H -#include <exception> +#include <stdexcept> #include <string.h> #include "tone.h" @@ -47,34 +47,10 @@ * @file dtmfgenerator.h * @brief DMTF Generator Exception */ -class DTMFException : public std::exception +class DTMFException : public std::runtime_error { - private: - - /** Message */ - const char* reason; public: - /** - * Constructor - * @param _reason An error message - */ - DTMFException (const char* _reason) throw(); - - /** - * Destructor - */ - virtual ~DTMFException() throw(); - /* - // Copy Constructor - DTMFException(const DTMFException& rh) throw(); - - // Assignment Operator - DTMFException& operator=( const DTMFException& rh) throw(); - */ - /** - * @return const char* The error - */ - virtual const char* what() const throw(); + DTMFException(const std::string& str) : std::runtime_error(str) {}; }; /*