Fixed problem with 'no_auth_information' exception when SASL support is disabled.
This commit is contained in:
parent
4522121196
commit
675c4cd3c2
@ -677,6 +677,30 @@ const char* file_not_found::name() const throw() { return "file_not_found"; }
|
||||
#endif // VMIME_HAVE_FILESYSTEM_FEATURES
|
||||
|
||||
|
||||
//
|
||||
// authentication_exception
|
||||
//
|
||||
|
||||
authentication_exception::~authentication_exception() throw() {}
|
||||
authentication_exception::authentication_exception(const string& what, const exception& other)
|
||||
: exception(what, other) {}
|
||||
|
||||
exception* authentication_exception::clone() const { return new authentication_exception(*this); }
|
||||
const char* authentication_exception::name() const throw() { return "authentication_exception"; }
|
||||
|
||||
|
||||
//
|
||||
// no_auth_information
|
||||
//
|
||||
|
||||
no_auth_information::~no_auth_information() throw() {}
|
||||
no_auth_information::no_auth_information(const exception& other)
|
||||
: authentication_exception("Information cannot be provided.", other) {}
|
||||
|
||||
exception* no_auth_information::clone() const { return new no_auth_information(*this); }
|
||||
const char* no_auth_information::name() const throw() { return "no_auth_information"; }
|
||||
|
||||
|
||||
#if VMIME_HAVE_SASL_SUPPORT
|
||||
|
||||
|
||||
@ -686,7 +710,7 @@ const char* file_not_found::name() const throw() { return "file_not_found"; }
|
||||
|
||||
sasl_exception::~sasl_exception() throw() {}
|
||||
sasl_exception::sasl_exception(const string& what, const exception& other)
|
||||
: exception(what, other) {}
|
||||
: authentication_exception(what, other) {}
|
||||
|
||||
exception* sasl_exception::clone() const { return new sasl_exception(*this); }
|
||||
const char* sasl_exception::name() const throw() { return "sasl_exception"; }
|
||||
@ -704,18 +728,6 @@ exception* no_such_mechanism::clone() const { return new no_such_mechanism(*this
|
||||
const char* no_such_mechanism::name() const throw() { return "no_such_mechanism"; }
|
||||
|
||||
|
||||
//
|
||||
// no_auth_information
|
||||
//
|
||||
|
||||
no_auth_information::~no_auth_information() throw() {}
|
||||
no_auth_information::no_auth_information(const exception& other)
|
||||
: sasl_exception("Information cannot be provided.", other) {}
|
||||
|
||||
exception* no_auth_information::clone() const { return new no_auth_information(*this); }
|
||||
const char* no_auth_information::name() const throw() { return "no_auth_information"; }
|
||||
|
||||
|
||||
#endif // VMIME_HAVE_SASL_SUPPORT
|
||||
|
||||
|
||||
@ -777,3 +789,4 @@ const char* unsupported_certificate_type::name() const throw() { return "unsuppo
|
||||
|
||||
|
||||
} // vmime
|
||||
|
||||
|
@ -819,13 +819,43 @@ public:
|
||||
#endif // VMIME_HAVE_FILESYSTEM_FEATURES
|
||||
|
||||
|
||||
/** Authentication exception.
|
||||
*/
|
||||
|
||||
class authentication_exception : public vmime::exception
|
||||
{
|
||||
public:
|
||||
|
||||
authentication_exception(const string& what, const exception& other = NO_EXCEPTION);
|
||||
~authentication_exception() throw();
|
||||
|
||||
exception* clone() const;
|
||||
const char* name() const throw();
|
||||
};
|
||||
|
||||
|
||||
/** The requested information cannot be provided.
|
||||
*/
|
||||
|
||||
class no_auth_information : public authentication_exception
|
||||
{
|
||||
public:
|
||||
|
||||
no_auth_information(const exception& other = NO_EXCEPTION);
|
||||
~no_auth_information() throw();
|
||||
|
||||
exception* clone() const;
|
||||
const char* name() const throw();
|
||||
};
|
||||
|
||||
|
||||
#if VMIME_HAVE_SASL_SUPPORT
|
||||
|
||||
|
||||
/** Base class for exceptions thrown by SASL module.
|
||||
*/
|
||||
|
||||
class sasl_exception : public vmime::exception
|
||||
class sasl_exception : public authentication_exception
|
||||
{
|
||||
public:
|
||||
|
||||
@ -852,21 +882,6 @@ public:
|
||||
};
|
||||
|
||||
|
||||
/** The requested information cannot be provided.
|
||||
*/
|
||||
|
||||
class no_auth_information : public sasl_exception
|
||||
{
|
||||
public:
|
||||
|
||||
no_auth_information(const exception& other = NO_EXCEPTION);
|
||||
~no_auth_information() throw();
|
||||
|
||||
exception* clone() const;
|
||||
const char* name() const throw();
|
||||
};
|
||||
|
||||
|
||||
#endif // VMIME_HAVE_SASL_SUPPORT
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user