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
Branches
Tags
No related merge requests found
......@@ -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
*/
......
......@@ -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) {};
};
/*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment