aboutsummaryrefslogtreecommitdiffstats
path: root/src/exception.cpp
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2005-10-30 15:24:33 +0000
committerVincent Richard <[email protected]>2005-10-30 15:24:33 +0000
commit675c4cd3c2c58641ee25212cd429a0b25d7e6c44 (patch)
tree15ff4921b7c72775c99254828ca6d53401ca1f79 /src/exception.cpp
parentMoved certificate code into 'vmime::net::security::cert' namespace. (diff)
downloadvmime-675c4cd3c2c58641ee25212cd429a0b25d7e6c44.tar.gz
vmime-675c4cd3c2c58641ee25212cd429a0b25d7e6c44.zip
Fixed problem with 'no_auth_information' exception when SASL support is disabled.
Diffstat (limited to 'src/exception.cpp')
-rw-r--r--src/exception.cpp39
1 files changed, 26 insertions, 13 deletions
diff --git a/src/exception.cpp b/src/exception.cpp
index bc599c76..9cfd2201 100644
--- a/src/exception.cpp
+++ b/src/exception.cpp
@@ -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
+