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