Fixed issues with color output.

This commit is contained in:
Patrick Lühne 2016-06-14 19:14:26 +02:00
parent 8084fe5574
commit 6b5c8df03a
2 changed files with 3 additions and 5 deletions

View File

@ -144,7 +144,8 @@ int main(int argc, char **argv)
if (language == plasp::Language::Type::PDDL)
{
auto context = plasp::pddl::Context(std::move(parser), std::move(logger));
auto pddlLogger = logger;
auto context = plasp::pddl::Context(std::move(parser), std::move(pddlLogger));
auto description = plasp::pddl::Description::fromContext(std::move(context));
const auto translator = plasp::pddl::TranslatorASP(description, description.context().logger.outputStream());
translator.translate();
@ -158,19 +159,16 @@ int main(int argc, char **argv)
}
catch (const plasp::utils::ParserException &e)
{
plasp::utils::Logger logger;
logger.logError(e.coordinate(), e.message());
return EXIT_FAILURE;
}
catch (const plasp::utils::TranslatorException &e)
{
plasp::utils::Logger logger;
logger.logError(e.what());
return EXIT_FAILURE;
}
catch (const std::exception &e)
{
plasp::utils::Logger logger;
logger.logError(e.what());
return EXIT_FAILURE;
}

View File

@ -46,7 +46,7 @@ class LogStream
LogStream(const LogStream &other)
: m_standardStream{other.m_standardStream},
m_colorPolicy{ColorPolicy::Auto}
m_colorPolicy{other.m_colorPolicy}
{
}