From f3b44c8aabe028c0133fe550b8ae18fbaf2023c4 Mon Sep 17 00:00:00 2001 From: Shuotian Cheng Date: Wed, 26 Jun 2019 19:25:08 -0700 Subject: [PATCH] [copporch]: Fix polymorphic type error (#946) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit copporch.cpp: In member function ‘virtual void CoppOrch::doTask(Consumer&)’: copporch.cpp:607:34: error: catching polymorphic type ‘const class std::out_of_range’ by value [-Werror=catch-value=] catch(const out_of_range e) ^ cc1plus: all warnings being treated as errors Signed-off-by: Shu0T1an ChenG --- orchagent/copporch.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/orchagent/copporch.cpp b/orchagent/copporch.cpp index 85fa5bf9248b..570cd225f694 100644 --- a/orchagent/copporch.cpp +++ b/orchagent/copporch.cpp @@ -604,7 +604,7 @@ void CoppOrch::doTask(Consumer &consumer) { task_status = processCoppRule(consumer); } - catch(const out_of_range e) + catch(const out_of_range& e) { SWSS_LOG_ERROR("processing copp rule threw out_of_range exception:%s", e.what()); task_status = task_process_status::task_invalid_entry;