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

* #6547: InstantMessageException: use runtime exceptions

Avoid using stack variables out of their scope
parent 87daf416
No related branches found
No related tags found
No related merge requests found
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
#include <map> #include <map>
#include <list> #include <list>
#include <exception> #include <stdexcept>
#include <iax-client.h> #include <iax-client.h>
...@@ -65,21 +65,11 @@ namespace sfl ...@@ -65,21 +65,11 @@ namespace sfl
const std::string IM_XML_URI ("uri"); const std::string IM_XML_URI ("uri");
const std::string BOUNDARY ("--boundary"); const std::string BOUNDARY ("--boundary");
class InstantMessageException : public std::exception class InstantMessageException : public std::runtime_error
{ {
public: public:
InstantMessageException (const std::string& str="") throw() : errstr (str) {} InstantMessageException (const std::string& str="") :
std::runtime_error("InstantMessageException occured: " + str) {}
virtual ~InstantMessageException() throw() {}
virtual const char *what() const throw() {
std::string expt ("InstantMessageException occured: ");
expt.append (errstr);
return expt.c_str();
}
private:
std::string errstr;
}; };
class InstantMessaging class InstantMessaging
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment