diff --git a/src/json.hpp b/src/json.hpp index e57685f4..b874a56a 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -2645,7 +2645,7 @@ class basic_json assert(m_value.array != nullptr); return m_value.array->at(idx); } - catch (std::out_of_range& e) + catch (std::out_of_range&) { // create better exception explanation throw std::out_of_range("array index " + std::to_string(idx) + " is out of range"); @@ -2689,7 +2689,7 @@ class basic_json assert(m_value.array != nullptr); return m_value.array->at(idx); } - catch (std::out_of_range& e) + catch (std::out_of_range&) { // create better exception explanation throw std::out_of_range("array index " + std::to_string(idx) + " is out of range"); @@ -2737,7 +2737,7 @@ class basic_json assert(m_value.object != nullptr); return m_value.object->at(key); } - catch (std::out_of_range& e) + catch (std::out_of_range&) { // create better exception explanation throw std::out_of_range("key '" + key + "' not found"); @@ -2785,7 +2785,7 @@ class basic_json assert(m_value.object != nullptr); return m_value.object->at(key); } - catch (std::out_of_range& e) + catch (std::out_of_range&) { // create better exception explanation throw std::out_of_range("key '" + key + "' not found"); diff --git a/src/json.hpp.re2c b/src/json.hpp.re2c index 431d72ee..00aa4d1f 100644 --- a/src/json.hpp.re2c +++ b/src/json.hpp.re2c @@ -2645,7 +2645,7 @@ class basic_json assert(m_value.array != nullptr); return m_value.array->at(idx); } - catch (std::out_of_range& e) + catch (std::out_of_range&) { // create better exception explanation throw std::out_of_range("array index " + std::to_string(idx) + " is out of range"); @@ -2689,7 +2689,7 @@ class basic_json assert(m_value.array != nullptr); return m_value.array->at(idx); } - catch (std::out_of_range& e) + catch (std::out_of_range&) { // create better exception explanation throw std::out_of_range("array index " + std::to_string(idx) + " is out of range"); @@ -2737,7 +2737,7 @@ class basic_json assert(m_value.object != nullptr); return m_value.object->at(key); } - catch (std::out_of_range& e) + catch (std::out_of_range&) { // create better exception explanation throw std::out_of_range("key '" + key + "' not found"); @@ -2785,7 +2785,7 @@ class basic_json assert(m_value.object != nullptr); return m_value.object->at(key); } - catch (std::out_of_range& e) + catch (std::out_of_range&) { // create better exception explanation throw std::out_of_range("key '" + key + "' not found");