From dbfcc74e23067a1cc2ceb3bccfff9e8868947419 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sun, 9 Jan 2022 14:38:01 +0000 Subject: Always catch exceptions as a constant reference. --- src/modules/m_ldapoper.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/modules/m_ldapoper.cpp') diff --git a/src/modules/m_ldapoper.cpp b/src/modules/m_ldapoper.cpp index 9d1e5a28b..d6fb979a2 100644 --- a/src/modules/m_ldapoper.cpp +++ b/src/modules/m_ldapoper.cpp @@ -119,7 +119,7 @@ class SearchInterface final LDAP->Bind(new BindInterface(this->creator, uid, opername, password), bindDn, password); } - catch (LDAPException& ex) + catch (const LDAPException& ex) { ServerInstance->SNO.WriteToSnoMask('a', "Error searching LDAP server: " + ex.GetReason()); } @@ -173,7 +173,7 @@ class AdminBindInterface final { LDAP->Search(new SearchInterface(this->creator, provider, user, opername, password), base, what); } - catch (LDAPException& ex) + catch (const LDAPException& ex) { ServerInstance->SNO.WriteToSnoMask('a', "Error searching LDAP server: " + ex.GetReason()); } @@ -240,7 +240,7 @@ class ModuleLDAPOper final LDAP->BindAsManager(new AdminBindInterface(this, LDAP.GetProvider(), user->uuid, opername, password, base, what)); return MOD_RES_DENY; } - catch (LDAPException& ex) + catch (const LDAPException& ex) { ServerInstance->SNO.WriteToSnoMask('a', "LDAP exception: " + ex.GetReason()); } -- cgit v1.3.1-10-gc9f91