Skip to content

Commit

Permalink
🚑 removed unsafe call to strerror #403
Browse files Browse the repository at this point in the history
  • Loading branch information
nlohmann committed Dec 28, 2016
1 parent e4c2829 commit 8381cd6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9077,7 +9077,7 @@ class basic_json
// immediately abort if stream is erroneous
if (s.fail())
{
throw std::invalid_argument("stream error: " + std::string(strerror(errno)));
throw std::invalid_argument("stream error");
}

// fill buffer
Expand Down
2 changes: 1 addition & 1 deletion src/json.hpp.re2c
Original file line number Diff line number Diff line change
Expand Up @@ -9077,7 +9077,7 @@ class basic_json
// immediately abort if stream is erroneous
if (s.fail())
{
throw std::invalid_argument("stream error: " + std::string(strerror(errno)));
throw std::invalid_argument("stream error");
}

// fill buffer
Expand Down

0 comments on commit 8381cd6

Please sign in to comment.