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)
|
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));
|
auto description = plasp::pddl::Description::fromContext(std::move(context));
|
||||||
const auto translator = plasp::pddl::TranslatorASP(description, description.context().logger.outputStream());
|
const auto translator = plasp::pddl::TranslatorASP(description, description.context().logger.outputStream());
|
||||||
translator.translate();
|
translator.translate();
|
||||||
@ -158,19 +159,16 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
catch (const plasp::utils::ParserException &e)
|
catch (const plasp::utils::ParserException &e)
|
||||||
{
|
{
|
||||||
plasp::utils::Logger logger;
|
|
||||||
logger.logError(e.coordinate(), e.message());
|
logger.logError(e.coordinate(), e.message());
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
catch (const plasp::utils::TranslatorException &e)
|
catch (const plasp::utils::TranslatorException &e)
|
||||||
{
|
{
|
||||||
plasp::utils::Logger logger;
|
|
||||||
logger.logError(e.what());
|
logger.logError(e.what());
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
catch (const std::exception &e)
|
catch (const std::exception &e)
|
||||||
{
|
{
|
||||||
plasp::utils::Logger logger;
|
|
||||||
logger.logError(e.what());
|
logger.logError(e.what());
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ class LogStream
|
|||||||
|
|
||||||
LogStream(const LogStream &other)
|
LogStream(const LogStream &other)
|
||||||
: m_standardStream{other.m_standardStream},
|
: m_standardStream{other.m_standardStream},
|
||||||
m_colorPolicy{ColorPolicy::Auto}
|
m_colorPolicy{other.m_colorPolicy}
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user