Enabled new output in app.

This commit is contained in:
Patrick Lühne 2016-11-24 02:57:33 +01:00
parent 6f5f7eace7
commit 2046edbee3
Signed by: patrick
GPG Key ID: 05F3611E97A70ABF
1 changed files with 8 additions and 8 deletions

View File

@ -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;
}