From: Adam C. Emerson Date: Wed, 29 Aug 2018 19:37:17 +0000 (-0400) Subject: cephfs: Do not catch polymorphic exception by value X-Git-Tag: v14.0.1~303^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9e90c0131029ab5a7800ad3a0f13c8ac942638a1;p=ceph.git cephfs: Do not catch polymorphic exception by value Signed-off-by: Adam C. Emerson --- diff --git a/src/tools/cephfs/JournalFilter.cc b/src/tools/cephfs/JournalFilter.cc index 3b30ffa092f2..266d7fccb578 100644 --- a/src/tools/cephfs/JournalFilter.cc +++ b/src/tools/cephfs/JournalFilter.cc @@ -226,7 +226,7 @@ int JournalFilter::parse_args( } else if (!type.compare("purge_queue")) { purge_action = PurgeItem::str_to_type(arg_str); } - } catch (std::out_of_range) { + } catch (const std::out_of_range&) { derr << "Invalid event type '" << arg_str << "'" << dendl; return -EINVAL; }