diff options
| author | 2022-01-09 14:38:01 +0000 | |
|---|---|---|
| committer | 2022-01-09 14:38:01 +0000 | |
| commit | dbfcc74e23067a1cc2ceb3bccfff9e8868947419 (patch) | |
| tree | c32f081119846966face3d36f6bb1af8ce4a2b9b /src/modules/m_ldapauth.cpp | |
| parent | Replace some references to "SSL" that snuck in during the merge. (diff) | |
Always catch exceptions as a constant reference.
Diffstat (limited to 'src/modules/m_ldapauth.cpp')
| -rw-r--r-- | src/modules/m_ldapauth.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/m_ldapauth.cpp b/src/modules/m_ldapauth.cpp index 05d1d822e..96704e2e3 100644 --- a/src/modules/m_ldapauth.cpp +++ b/src/modules/m_ldapauth.cpp @@ -167,7 +167,7 @@ class BindInterface final LDAP->Compare(this, DN, attr, val); ++attrCount; } - catch (LDAPException &ex) + catch (const LDAPException& ex) { if (verbose) ServerInstance->SNO.WriteToSnoMask('c', "Unable to compare attributes %s=%s: %s", attr.c_str(), val.c_str(), ex.GetReason().c_str()); @@ -244,7 +244,7 @@ class SearchInterface final LDAP->Bind(new BindInterface(this->creator, provider, uid, bindDn), bindDn, user->password); } - catch (LDAPException& ex) + catch (const LDAPException& ex) { ServerInstance->SNO.WriteToSnoMask('a', "Error searching LDAP server: " + ex.GetReason()); } @@ -284,7 +284,7 @@ class AdminBindInterface final { LDAP->Search(new SearchInterface(this->creator, provider, uuid), base, what); } - catch (LDAPException& ex) + catch (const LDAPException& ex) { ServerInstance->SNO.WriteToSnoMask('a', "Error searching LDAP server: " + ex.GetReason()); } @@ -428,7 +428,7 @@ public: { LDAP->BindAsManager(new AdminBindInterface(this, LDAP.GetProvider(), user->uuid, base, what)); } - catch (LDAPException &ex) + catch (const LDAPException& ex) { ServerInstance->SNO.WriteToSnoMask('a', "LDAP exception: " + ex.GetReason()); ServerInstance->Users.QuitUser(user, killreason); |
