Skip to content

Commit

Permalink
Merge pull request #65 from Rholais/patch-1
Browse files Browse the repository at this point in the history
Fix error: catching polymorphic type by value
  • Loading branch information
Taylor C. Richberger committed Sep 24, 2018
2 parents 3de44ec + 95e7d98 commit 24868af
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,17 +185,17 @@ int main(int argc, char **argv)
{
parser.ParseCLI(argc, argv);
}
catch (args::Completion e)
catch (const args::Completion& e)
{
std::cout << e.what();
return 0;
}
catch (args::Help)
catch (const args::Help&)
{
std::cout << parser;
return 0;
}
catch (args::ParseError e)
catch (const args::ParseError& e)
{
std::cerr << e.what() << std::endl;
std::cerr << parser;
Expand Down

0 comments on commit 24868af

Please sign in to comment.