Skip to content

Commit

Permalink
[copporch]: Fix polymorphic type error (sonic-net#946)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
stcheng authored Jun 27, 2019
1 parent 4b5f8f2 commit f3b44c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion orchagent/copporch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f3b44c8

Please sign in to comment.