Skip to content
Snippets Groups Projects
Commit 07b3b786 authored by Rafaël Carré's avatar Rafaël Carré
Browse files

* #6547: DTMFException: use runtime exceptions

parent 80e0096e
No related branches found
No related tags found
No related merge requests found
...@@ -62,22 +62,6 @@ const DTMFGenerator::DTMFTone DTMFGenerator::tones[NUM_TONES] = { ...@@ -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 * Initialize the generator
*/ */
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
#ifndef DTMFGENERATOR_H #ifndef DTMFGENERATOR_H
#define DTMFGENERATOR_H #define DTMFGENERATOR_H
#include <exception> #include <stdexcept>
#include <string.h> #include <string.h>
#include "tone.h" #include "tone.h"
...@@ -47,34 +47,10 @@ ...@@ -47,34 +47,10 @@
* @file dtmfgenerator.h * @file dtmfgenerator.h
* @brief DMTF Generator Exception * @brief DMTF Generator Exception
*/ */
class DTMFException : public std::exception class DTMFException : public std::runtime_error
{ {
private:
/** Message */
const char* reason;
public: public:
/** DTMFException(const std::string& str) : std::runtime_error(str) {};
* 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();
}; };
/* /*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment