Enabled new output in app.
This commit is contained in:
parent
6f5f7eace7
commit
2046edbee3
16
app/main.cpp
16
app/main.cpp
@ -7,6 +7,8 @@
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
anthem::Context context;
|
||||
|
||||
namespace po = boost::program_options;
|
||||
|
||||
po::options_description description("Allowed options");
|
||||
@ -23,14 +25,12 @@ int main(int argc, char **argv)
|
||||
const auto printHelp =
|
||||
[&]()
|
||||
{
|
||||
std::cout << "Usage: anthem [files] [options]" << std::endl;
|
||||
std::cout << "Translate ASP programs to the language of first-order theorem provers." << std::endl << std::endl;
|
||||
|
||||
std::cout << description;
|
||||
std::cout
|
||||
<< "Usage: anthem [files] [options]" << std::endl
|
||||
<< "Translate ASP programs to the language of first-order theorem provers." << std::endl << std::endl
|
||||
<< description;
|
||||
};
|
||||
|
||||
anthem::Context context;
|
||||
|
||||
try
|
||||
{
|
||||
po::store(po::command_line_parser(argc, argv)
|
||||
@ -42,7 +42,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
catch (const po::error &e)
|
||||
{
|
||||
std::cerr << "error: " << e.what() << std::endl;
|
||||
context.logger.log(anthem::output::Priority::Error, e.what());
|
||||
printHelp();
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
@ -71,7 +71,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
std::cerr << "error: " << e.what() << std::endl;
|
||||
context.logger.log(anthem::output::Priority::Error, e.what());
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user