1
0
mirror of https://github.com/nlohmann/json synced 2024-11-22 20:10:06 +00:00

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);
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");

View File

@ -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");