File tree Expand file tree Collapse file tree 5 files changed +15
-22
lines changed
Expand file tree Collapse file tree 5 files changed +15
-22
lines changed Original file line number Diff line number Diff line change @@ -9,16 +9,12 @@ class MailClientException: public exception
99{
1010public:
1111 MailClientException () {}
12- MailClientException (string exc): exception(exc.c_str()) {}
13- virtual ~MailClientException () {
14- exception::~exception ();
15- }
16- const char * what () const override {
17- string tmp = exception::what ();
18- tmp = " MailClientException: " + tmp;
19- return tmp.c_str ();
20- }
12+ MailClientException (const string& exc): exception(exc.c_str()) {}
13+ MailClientException (const MailClientException& mce): exception(mce) {}
14+ virtual ~MailClientException () throw () = 0 ;
15+ virtual const char * what () const = 0;
2116};
2217
18+ MailClientException::~exception () {}
2319
2420#endif // MAILCLIENTEXCEPTION_H
Original file line number Diff line number Diff line change @@ -6,10 +6,9 @@ class MailGenerationException: public MailClientException
66{
77public:
88 MailGenerationException () {}
9- MailGenerationException (string exc): MailClientException(exc.c_str()) {}
10- virtual ~MailGenerationException () {
11- MailClientException::~MailClientException ();
12- }
9+ MailGenerationException (const string& exc): MailClientException(exc.c_str()) {}
10+ MailClientException (const MailClientException& mce): MailClientException(mce) {}
11+ ~MailGenerationException () override {}
1312 const char * what () const override {
1413 string tmp = MailClientException::what ();
1514 tmp = " MailGenerationException: " + tmp;
Original file line number Diff line number Diff line change @@ -6,10 +6,9 @@ class MailReceiveException: public MailClientException
66{
77public:
88 MailReceiveException () {}
9- MailReceiveException (string exc): MailClientException(exc.c_str()) {}
10- virtual ~MailReceiveException () {
11- MailClientException::~MailClientException ();
12- }
9+ MailReceiveException (const string& exc): MailClientException(exc.c_str()) {}
10+ MailClientException (const MailClientException& mce): MailClientException(mce) {}
11+ ~MailReceiveException () override {}
1312 const char * what () const override {
1413 string tmp = MailClientException::what ();
1514 tmp = " MailGenerationException: " + tmp;
Original file line number Diff line number Diff line change @@ -6,10 +6,9 @@ class MailSendException: public MailClientException
66{
77public:
88 MailSendException () {}
9- MailSendException (string exc): MailClientException(exc.c_str()) {}
10- virtual ~MailSendException () {
11- MailClientException::~MailClientException ();
12- }
9+ MailSendException (const string& exc): MailClientException(exc.c_str()) {}
10+ MailClientException (const MailClientException& mce): MailClientException(mce) {}
11+ ~MailSendException () override {}
1312 const char * what () const override {
1413 string tmp = MailClientException::what ();
1514 tmp = " MailGenerationException: " + tmp;
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" UTF-8" ?>
22<!DOCTYPE QtCreatorProject >
3- <!-- Written by QtCreator 3.6.1, 2016-05-27T20:11:28 . -->
3+ <!-- Written by QtCreator 3.6.1, 2016-05-27T22:41:34 . -->
44<qtcreator >
55 <data >
66 <variable >EnvironmentId</variable >
You can’t perform that action at this time.
0 commit comments