aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Barbier <anthony.barbier@arm.com>2017-08-09 14:27:09 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:35:24 +0000
commitd4ab78a309f2932a87af7cd6854a0665f051077c (patch)
treeff97992d5091517c157fb68736c63929475bcf73
parentf07f145ba9e050b66df9beab98d014707d33e74c (diff)
downloadComputeLibrary-d4ab78a309f2932a87af7cd6854a0665f051077c.tar.gz
COMPMID-415 Fixed JSON printer to output errors as an array of single lines instead of a multi-line string
Change-Id: I02a14fac2dbf31beb9c6e8a7744c47ccab207996 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/83374 Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com> Reviewed-by: Moritz Pflanzer <moritz.pflanzer@arm.com>
-rw-r--r--framework/printers/JSONPrinter.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/framework/printers/JSONPrinter.cpp b/framework/printers/JSONPrinter.cpp
index 3408174b48..10cc911eba 100644
--- a/framework/printers/JSONPrinter.cpp
+++ b/framework/printers/JSONPrinter.cpp
@@ -102,9 +102,15 @@ void JSONPrinter::print_errors_footer()
void JSONPrinter::print_error(const std::exception &error)
{
- print_separator(_first_error);
+ std::stringstream error_log;
+ error_log.str(error.what());
- *_stream << R"(")" << error.what() << R"(")";
+ for(std::string line; !std::getline(error_log, line).eof();)
+ {
+ print_separator(_first_error);
+
+ *_stream << R"(")" << line << R"(")";
+ }
}
void JSONPrinter::print_measurements(const Profiler::MeasurementsMap &measurements)