should catch polymorphic exceptions by reference. this silences warnings
like:
error: catching polymorphic type ‘class std::RetryException’ by value
[-Werror=catch-value=]
} catch (std::RetryException) {
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit
62382040ee9b655a68b15ccb43cebb39c9dc3a45)
# Conflicts:
# src/mgr/DaemonState.h
- skipped mgr/DaemonState.h, which is new code
try {
val = boost::get<T>(cmdmap.find(k)->second);
return true;
- } catch (boost::bad_get) {
+ } catch (boost::bad_get&) {
handle_bad_get(cct, k, typeid(T).name());
}
}
out: \
complete_inject_failure(); \
return r; \
- } catch (RetryException) { \
+ } catch (RetryException&) { \
failed = true; \
} catch (...) { \
ceph_abort(); \