2011-12-16 23:38:28 +00:00
|
|
|
#ifndef TLEEXCEPTION_H_
|
|
|
|
#define TLEEXCEPTION_H_
|
|
|
|
|
|
|
|
#include <exception>
|
|
|
|
|
|
|
|
class TleException : public std::exception
|
|
|
|
{
|
|
|
|
public:
|
2012-10-11 18:52:51 +00:00
|
|
|
/**
|
|
|
|
* Constructor
|
|
|
|
* @param message Exception message
|
|
|
|
*/
|
2011-12-16 23:38:28 +00:00
|
|
|
TleException(const char* message)
|
2012-10-11 18:52:51 +00:00
|
|
|
: m_message(message)
|
2011-12-16 23:38:28 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2012-10-11 18:52:51 +00:00
|
|
|
/**
|
|
|
|
* Destructor
|
|
|
|
*/
|
2011-12-16 23:38:28 +00:00
|
|
|
virtual ~TleException(void) throw ()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2012-10-11 18:52:51 +00:00
|
|
|
/**
|
|
|
|
* Get the exception message
|
|
|
|
* @returns the exception message
|
|
|
|
*/
|
2011-12-16 23:38:28 +00:00
|
|
|
virtual const char* what() const throw ()
|
|
|
|
{
|
2012-10-11 18:52:51 +00:00
|
|
|
return m_message.c_str();
|
2011-12-16 23:38:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
2012-10-11 18:52:51 +00:00
|
|
|
/** the exception message */
|
|
|
|
std::string m_message;
|
2011-12-16 23:38:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|