Use appropriate syntax for rethrowing exceptions.

This commit is contained in:
Vincent Richard 2014-01-19 23:27:37 +01:00
parent ab5a0b75db
commit 6c9a32d314
3 changed files with 10 additions and 10 deletions

View File

@ -234,23 +234,23 @@ void IMAPConnection::authenticate()
authenticateSASL(); authenticateSASL();
return; return;
} }
catch (exceptions::authentication_error& e) catch (exceptions::authentication_error&)
{ {
if (!GET_PROPERTY(bool, PROPERTY_OPTIONS_SASL_FALLBACK)) if (!GET_PROPERTY(bool, PROPERTY_OPTIONS_SASL_FALLBACK))
{ {
// Can't fallback on normal authentication // Can't fallback on normal authentication
internalDisconnect(); internalDisconnect();
throw e; throw;
} }
else else
{ {
// Ignore, will try normal authentication // Ignore, will try normal authentication
} }
} }
catch (exception& e) catch (exception&)
{ {
internalDisconnect(); internalDisconnect();
throw e; throw;
} }
} }
#endif // VMIME_HAVE_SASL_SUPPORT #endif // VMIME_HAVE_SASL_SUPPORT

View File

@ -233,23 +233,23 @@ void POP3Connection::authenticate(const messageId& randomMID)
m_authenticated = true; m_authenticated = true;
return; return;
} }
catch (exceptions::authentication_error& e) catch (exceptions::authentication_error&)
{ {
if (!GET_PROPERTY(bool, PROPERTY_OPTIONS_SASL_FALLBACK)) if (!GET_PROPERTY(bool, PROPERTY_OPTIONS_SASL_FALLBACK))
{ {
// Can't fallback on APOP/normal authentication // Can't fallback on APOP/normal authentication
internalDisconnect(); internalDisconnect();
throw e; throw;
} }
else else
{ {
// Ignore, will try APOP/normal authentication // Ignore, will try APOP/normal authentication
} }
} }
catch (exception& e) catch (exception&)
{ {
internalDisconnect(); internalDisconnect();
throw e; throw;
} }
} }
#endif // VMIME_HAVE_SASL_SUPPORT #endif // VMIME_HAVE_SASL_SUPPORT

View File

@ -294,10 +294,10 @@ void SMTPConnection::authenticate()
m_authenticated = true; m_authenticated = true;
return; return;
} }
catch (exception& e) catch (exception&)
{ {
internalDisconnect(); internalDisconnect();
throw e; throw;
} }
} }
#endif // VMIME_HAVE_SASL_SUPPORT #endif // VMIME_HAVE_SASL_SUPPORT