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_spanningtree/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/modules/m_spanningtree/main.cpp') diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index 02668d190..70005841f 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -269,7 +269,7 @@ void ModuleSpanningTree::ConnectServer(std::shared_ptr x, std::shared_ptr< { DNS->Process(snr); } - catch (DNS::Exception& e) + catch (const DNS::Exception& e) { delete snr; ServerInstance->SNO.WriteToSnoMask('l', "CONNECT: Error connecting \002%s\002: %s.",x->Name.c_str(), e.GetReason().c_str()); @@ -676,7 +676,7 @@ void ModuleSpanningTree::ReadConfig(ConfigStatus& status) { Utils->ReadConfiguration(); } - catch (ModuleException& e) + catch (const ModuleException& e) { // Refresh the IP cache anyway, so servers read before the error will be allowed to connect Utils->RefreshIPCache(); -- cgit v1.3.1-10-gc9f91