Skip to content

Commit

Permalink
2/2 Apply suggestions from code review 3130
Browse files Browse the repository at this point in the history
  • Loading branch information
dupa dup committed Nov 16, 2023
1 parent ec306c8 commit 0593ca1
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/platform/options/default_configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "mir/abnormal_exit.h"
#include "mir/shared_library_prober.h"
#include "mir/logging/null_shared_library_prober_report.h"

#include <iostream>
namespace mo = mir::options;

char const* const mo::arw_server_socket_opt = "arw-file";
Expand Down Expand Up @@ -309,20 +309,23 @@ void mo::DefaultConfiguration::parse_arguments(
{
std::ostringstream mir_version;
mir_version << MIR_VERSION_MAJOR << "." << MIR_VERSION_MINOR << "." << MIR_VERSION_MICRO << std::endl;
BOOST_THROW_EXCEPTION(mir::ExitWithOutput(the_version_of_mir.str()));
std::cout << mir_version.str();
exit(0);
}
if (options.is_set("help"))
{
std::ostringstream help_text;
help_text << desc;
BOOST_THROW_EXCEPTION(mir::ExitWithOutput(help_text.str()));
std::cout << help_text.str();
exit(0);
}
}
catch (po::error const& error)
{
std::ostringstream help_text;
help_text << "Failed to parse command line options: " << error.what() << "." << std::endl << desc;
BOOST_THROW_EXCEPTION(mir::AbnormalExit(help_text.str()));

}
}

Expand Down

0 comments on commit 0593ca1

Please sign in to comment.