removing unused catch variables (fixes #180)

This commit is contained in:
Niels 2016-01-13 19:19:35 +01:00
parent 151d43f63e
commit 4511145d3d
2 changed files with 8 additions and 8 deletions

View file

@ -2645,7 +2645,7 @@ class basic_json
assert(m_value.array != nullptr); assert(m_value.array != nullptr);
return m_value.array->at(idx); return m_value.array->at(idx);
} }
catch (std::out_of_range& e) catch (std::out_of_range&)
{ {
// create better exception explanation // create better exception explanation
throw std::out_of_range("array index " + std::to_string(idx) + " is out of range"); 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); assert(m_value.array != nullptr);
return m_value.array->at(idx); return m_value.array->at(idx);
} }
catch (std::out_of_range& e) catch (std::out_of_range&)
{ {
// create better exception explanation // create better exception explanation
throw std::out_of_range("array index " + std::to_string(idx) + " is out of range"); 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); assert(m_value.object != nullptr);
return m_value.object->at(key); return m_value.object->at(key);
} }
catch (std::out_of_range& e) catch (std::out_of_range&)
{ {
// create better exception explanation // create better exception explanation
throw std::out_of_range("key '" + key + "' not found"); throw std::out_of_range("key '" + key + "' not found");
@ -2785,7 +2785,7 @@ class basic_json
assert(m_value.object != nullptr); assert(m_value.object != nullptr);
return m_value.object->at(key); return m_value.object->at(key);
} }
catch (std::out_of_range& e) catch (std::out_of_range&)
{ {
// create better exception explanation // create better exception explanation
throw std::out_of_range("key '" + key + "' not found"); throw std::out_of_range("key '" + key + "' not found");

View file

@ -2645,7 +2645,7 @@ class basic_json
assert(m_value.array != nullptr); assert(m_value.array != nullptr);
return m_value.array->at(idx); return m_value.array->at(idx);
} }
catch (std::out_of_range& e) catch (std::out_of_range&)
{ {
// create better exception explanation // create better exception explanation
throw std::out_of_range("array index " + std::to_string(idx) + " is out of range"); 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); assert(m_value.array != nullptr);
return m_value.array->at(idx); return m_value.array->at(idx);
} }
catch (std::out_of_range& e) catch (std::out_of_range&)
{ {
// create better exception explanation // create better exception explanation
throw std::out_of_range("array index " + std::to_string(idx) + " is out of range"); 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); assert(m_value.object != nullptr);
return m_value.object->at(key); return m_value.object->at(key);
} }
catch (std::out_of_range& e) catch (std::out_of_range&)
{ {
// create better exception explanation // create better exception explanation
throw std::out_of_range("key '" + key + "' not found"); throw std::out_of_range("key '" + key + "' not found");
@ -2785,7 +2785,7 @@ class basic_json
assert(m_value.object != nullptr); assert(m_value.object != nullptr);
return m_value.object->at(key); return m_value.object->at(key);
} }
catch (std::out_of_range& e) catch (std::out_of_range&)
{ {
// create better exception explanation // create better exception explanation
throw std::out_of_range("key '" + key + "' not found"); throw std::out_of_range("key '" + key + "' not found");