Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unused variables in catch #180

Closed
gregmarr opened this issue Jan 13, 2016 · 1 comment
Closed

Unused variables in catch #180

gregmarr opened this issue Jan 13, 2016 · 1 comment
Assignees
Milestone

Comments

@gregmarr
Copy link
Contributor

This causes warnings about unused parameters or variables on MSVC.

patch.diff.txt

@@ -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");
@nlohmann nlohmann self-assigned this Jan 13, 2016
@nlohmann
Copy link
Owner

Thanks!

@nlohmann nlohmann added this to the Release 1.0.1 milestone Jan 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants