1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
/*! \file
* header functions for qexception
*/
# ifndef _qexception_hh_
# define _qexception_hh_
using namespace std;
#include <string>
/*!
* \brief class for quelcom specific exceptions
*
* simple class for raising and catching quelcom specific exceptions. it includes info from the method which raised the exception for debugging purpouses.
*/
class qexception {
private:
//! the method where the exception is raised
string method;
//! info describing the cause of the exception raising
string info;
public:
/*!
* initializes itself with the given method and info
* \param m the method where the exception has been raised
* \param i info explaining the cause of the exception raising
*/
qexception (string m=string(), string i=string()):method(m),info(i) { }
/*!
* \brief gets the info of the exception
* \return a string containg the info of the exception
*/
string getInfo();
/*!
* \brief print the wav characteristics on the given output stream
* \param os the given output stream
*/
void print (ostream *os);
};
ostream &operator<<(ostream &os, qexception &e);
# endif
|