Skip to content

Commit

Permalink
Fix more catch std::string occurances
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanJPhillips committed Oct 25, 2017
1 parent d115b4e commit a6adb19
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 18 deletions.
10 changes: 5 additions & 5 deletions src/cbmc/cbmc_parse_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ int cbmc_parse_optionst::doit()
return 6; // should contemplate EX_SOFTWARE from sysexits.h
}

catch(const std::string error_msg)
catch(const std::string &error_msg)
{
error() << error_msg << eom;
return 6; // should contemplate EX_SOFTWARE from sysexits.h
Expand Down Expand Up @@ -586,7 +586,7 @@ bool cbmc_parse_optionst::set_properties()
return true;
}

catch(const std::string e)
catch(const std::string &e)
{
error() << e << eom;
return true;
Expand Down Expand Up @@ -648,7 +648,7 @@ int cbmc_parse_optionst::get_goto_program(
return 6;
}

catch(const std::string e)
catch(const std::string &e)
{
error() << e << eom;
return 6;
Expand Down Expand Up @@ -708,7 +708,7 @@ void cbmc_parse_optionst::preprocessing()
error() << e << eom;
}

catch(const std::string e)
catch(const std::string &e)
{
error() << e << eom;
}
Expand Down Expand Up @@ -840,7 +840,7 @@ bool cbmc_parse_optionst::process_goto_program(
return true;
}

catch(const std::string e)
catch(const std::string &e)
{
error() << e << eom;
return true;
Expand Down
2 changes: 1 addition & 1 deletion src/clobber/clobber_parse_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ int clobber_parse_optionst::doit()
return 0;
}

catch(const std::string error_msg)
catch(const std::string &error_msg)
{
error() << error_msg << messaget::eom;
return 8;
Expand Down
4 changes: 2 additions & 2 deletions src/goto-analyzer/goto_analyzer_parse_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ bool goto_analyzer_parse_optionst::set_properties()
return true;
}

catch(const std::string e)
catch(const std::string &e)
{
error() << e << eom;
return true;
Expand Down Expand Up @@ -403,7 +403,7 @@ bool goto_analyzer_parse_optionst::process_goto_program(
return true;
}

catch(const std::string e)
catch(const std::string &e)
{
error() << e << eom;
return true;
Expand Down
2 changes: 1 addition & 1 deletion src/goto-cc/goto_cc_mode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ int goto_cc_modet::main(int argc, const char **argv)
return EX_SOFTWARE;
}

catch(const std::string e)
catch(const std::string &e)
{
error() << e << eom;
return EX_SOFTWARE;
Expand Down
2 changes: 1 addition & 1 deletion src/goto-diff/goto_diff_parse_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ bool goto_diff_parse_optionst::process_goto_program(
return true;
}

catch(const std::string e)
catch(const std::string &e)
{
error() << e << eom;
return true;
Expand Down
2 changes: 1 addition & 1 deletion src/goto-instrument/goto_instrument_parse_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ int goto_instrument_parse_optionst::doit()
return 11;
}

catch(const std::string e)
catch(const std::string &e)
{
error() << e << eom;
return 11;
Expand Down
2 changes: 1 addition & 1 deletion src/goto-programs/initialize_goto_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ bool initialize_goto_model(
msg.error() << e << messaget::eom;
return true;
}
catch(const std::string e)
catch(const std::string &e)
{
msg.error() << e << messaget::eom;
return true;
Expand Down
8 changes: 4 additions & 4 deletions src/jbmc/jbmc_parse_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ int jbmc_parse_optionst::doit()
return 6; // should contemplate EX_SOFTWARE from sysexits.h
}

catch(const std::string error_msg)
catch(const std::string &error_msg)
{
error() << error_msg << eom;
return 6; // should contemplate EX_SOFTWARE from sysexits.h
Expand Down Expand Up @@ -546,7 +546,7 @@ bool jbmc_parse_optionst::set_properties()
return true;
}

catch(const std::string e)
catch(const std::string &e)
{
error() << e << eom;
return true;
Expand Down Expand Up @@ -608,7 +608,7 @@ int jbmc_parse_optionst::get_goto_program(
return 6;
}

catch(const std::string e)
catch(const std::string &e)
{
error() << e << eom;
return 6;
Expand Down Expand Up @@ -772,7 +772,7 @@ bool jbmc_parse_optionst::process_goto_program(
return true;
}

catch(const std::string e)
catch(const std::string &e)
{
error() << e << eom;
return true;
Expand Down
2 changes: 1 addition & 1 deletion src/memory-models/mmcc_parse_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ int mmcc_parse_optionst::doit()
std::cerr << error << '\n';
return 10;
}
catch(const std::string error)
catch(const std::string &error)
{
std::cerr << error << '\n';
return 10;
Expand Down
2 changes: 1 addition & 1 deletion unit/testing-utils/catch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7326,7 +7326,7 @@ namespace Catch {
catch( std::exception& ex ) {
return ex.what();
}
catch( std::string& msg ) {
catch(const std::string &msg) {
return msg;
}
catch( const char* msg ) {
Expand Down

0 comments on commit a6adb19

Please sign in to comment.