Skip to content

Commit

Permalink
removing unused catch variables (fixes #180)
Browse files Browse the repository at this point in the history
  • Loading branch information
nlohmann committed Jan 13, 2016
1 parent 151d43f commit 4511145
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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");
Expand Down
8 changes: 4 additions & 4 deletions src/json.hpp.re2c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit 4511145

Please sign in to comment.