Fixed issues with color output.
This commit is contained in:
parent
8084fe5574
commit
6b5c8df03a
@ -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;
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ class LogStream
|
||||
|
||||
LogStream(const LogStream &other)
|
||||
: m_standardStream{other.m_standardStream},
|
||||
m_colorPolicy{ColorPolicy::Auto}
|
||||
m_colorPolicy{other.m_colorPolicy}
|
||||
{
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user