Skip to content

Commit

Permalink
Work on issue #212
Browse files Browse the repository at this point in the history
  • Loading branch information
danielaparker committed Feb 8, 2020
1 parent fad234b commit 1e88b55
Show file tree
Hide file tree
Showing 10 changed files with 175 additions and 193 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ int main()
std::cout << event.event_type() << ": " << event.get<double>() << "\n";
break;
default:
std::cout << "Unhandled event type: " << event.event_type() << " " << "\n";;
std::cout << "Unhandled event type: " << event.event_type() << " " << "\n";
break;
}
}
Expand Down
4 changes: 2 additions & 2 deletions doc/Examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ for (; !cursor.done(); cursor.next())
std::cout << event.event_type() << ": " << event.get<double>() << "\n";
break;
default:
std::cout << "Unhandled event type: " << event.event_type() << " " << "\n";;
std::cout << "Unhandled event type: " << event.event_type() << " " << "\n";
break;
}
}
Expand Down Expand Up @@ -476,7 +476,7 @@ for (; !cursor.done(); cursor.next())
std::cout << event.get<jsoncons::string_view>() << "\n";
break;
default:
std::cout << "Unhandled event type: " << event.event_type() << " " << "\n";;
std::cout << "Unhandled event type: " << event.event_type() << " " << "\n";
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion doc/Pages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ int main()
std::cout << event.event_type() << ": " << event.get<double>() << "\n";
break;
default:
std::cout << "Unhandled event type: " << event.event_type() << " " << "\n";;
std::cout << "Unhandled event type: " << event.event_type() << " " << "\n";
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion doc/ref/csv/csv.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ int main()
std::cout << event.event_type() << ": " << event.get<double>() << "\n";
break;
default:
std::cout << "Unhandled event type: " << event.event_type() << " " << "\n";;
std::cout << "Unhandled event type: " << event.event_type() << " " << "\n";
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/src/csv_examples.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ void as_a_stream_of_json_events()
std::cout << event.event_type() << ": " << event.get<double>() << "\n";
break;
default:
std::cout << "Unhandled event type: " << event.event_type() << " " << "\n";;
std::cout << "Unhandled event type: " << event.event_type() << " " << "\n";
break;
}
}
Expand Down
4 changes: 2 additions & 2 deletions examples/src/json_cursor_examples.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ void reading_a_json_stream()
std::cout << event.event_type() << ": " << event.get<double>() << "\n";
break;
default:
std::cout << "Unhandled event type: " << event.event_type() << " " << "\n";;
std::cout << "Unhandled event type: " << event.event_type() << " " << "\n";
break;
}
}
Expand Down Expand Up @@ -125,7 +125,7 @@ void filtering_a_json_stream()
std::cout << event.get<jsoncons::string_view>() << "\n";
break;
default:
std::cout << "Unhandled event type: " << event.event_type() << " " << "\n";;
std::cout << "Unhandled event type: " << event.event_type() << " " << "\n";
break;
}
}
Expand Down
4 changes: 2 additions & 2 deletions examples/src/readme_examples.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ namespace readme
std::cout << event.event_type() << ": " << event.get<double>() << "\n";
break;
default:
std::cout << "Unhandled event type: " << event.event_type() << " " << "\n";;
std::cout << "Unhandled event type: " << event.event_type() << " " << "\n";
break;
}
}
Expand Down Expand Up @@ -205,7 +205,7 @@ namespace readme
std::cout << event.get<jsoncons::string_view>() << "\n";
break;
default:
std::cout << "Unhandled event type: " << event.event_type() << " " << "\n";;
std::cout << "Unhandled event type: " << event.event_type() << " " << "\n";
break;
}
}
Expand Down
12 changes: 1 addition & 11 deletions include/jsoncons_ext/jsonpatch/jsonpatch_error.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,23 +90,13 @@ namespace jsoncons { namespace jsonpatch {
{
}

jsonpatch_error(const std::error_code& ec, const std::string& what_arg)
: std::system_error(ec, what_arg)
{
}

jsonpatch_error(const std::error_code& ec, const char* what_arg)
: std::system_error(ec, what_arg)
{
}

jsonpatch_error(const jsonpatch_error& other) = default;

jsonpatch_error(jsonpatch_error&& other) = default;

const char* what() const noexcept override
{
return std::system_error::what();
return this->code().message().c_str();
}

jsonpatch_error& operator=(const jsonpatch_error& e) = default;
Expand Down
Loading

0 comments on commit 1e88b55

Please sign in to comment.