From ab5f9c18bd16178182a03a6655470d6c98c192d5 Mon Sep 17 00:00:00 2001 From: fekir Date: Mon, 26 Mar 2018 20:13:49 +0200 Subject: [PATCH] catch by reference in all samples (#1154) --- CppCoreGuidelines.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 3fb593a..b86e55a 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -15141,7 +15141,7 @@ A user-defined type is unlikely to clash with other people's exceptions. my_code(); // ... } - catch(Bufferpool_exhausted) { + catch(const Bufferpool_exhausted&) { // ... } } @@ -15187,7 +15187,7 @@ The standard-library classes derived from `exception` should be used only as bas my_code(); // ... } - catch(runtime_error) { // runtime_error means "input buffer too small" + catch(const runtime_error&) { // runtime_error means "input buffer too small" // ... } }