Commit 26514ab7315ad3ecf29f113fa777326d13646a66
1 parent
22a167a0
Write linearization errors to stderr (fixes #438)
Showing
2 changed files
with
10 additions
and
5 deletions
ChangeLog
libqpdf/QPDF_linearization.cc
| ... | ... | @@ -73,7 +73,7 @@ QPDF::checkLinearization() |
| 73 | 73 | } |
| 74 | 74 | catch (QPDFExc& e) |
| 75 | 75 | { |
| 76 | - *this->m->out_stream << e.what() << std::endl; | |
| 76 | + *this->m->err_stream << e.what() << std::endl; | |
| 77 | 77 | } |
| 78 | 78 | return result; |
| 79 | 79 | } |
| ... | ... | @@ -386,7 +386,7 @@ QPDF::readHintStream(Pipeline& pl, qpdf_offset_t offset, size_t length) |
| 386 | 386 | if ((computed_end < min_end_offset) || |
| 387 | 387 | (computed_end > max_end_offset)) |
| 388 | 388 | { |
| 389 | - *this->m->out_stream << "expected = " << computed_end | |
| 389 | + *this->m->err_stream << "expected = " << computed_end | |
| 390 | 390 | << "; actual = " << min_end_offset << ".." |
| 391 | 391 | << max_end_offset << std::endl; |
| 392 | 392 | throw QPDFExc(qpdf_e_damaged_pdf, this->m->file->getName(), |
| ... | ... | @@ -661,7 +661,7 @@ QPDF::checkLinearizationInternal() |
| 661 | 661 | for (std::list<std::string>::iterator iter = errors.begin(); |
| 662 | 662 | iter != errors.end(); ++iter) |
| 663 | 663 | { |
| 664 | - *this->m->out_stream << "WARNING: " << (*iter) << std::endl; | |
| 664 | + *this->m->err_stream << "WARNING: " << (*iter) << std::endl; | |
| 665 | 665 | } |
| 666 | 666 | } |
| 667 | 667 | |
| ... | ... | @@ -671,7 +671,7 @@ QPDF::checkLinearizationInternal() |
| 671 | 671 | for (std::list<std::string>::iterator iter = warnings.begin(); |
| 672 | 672 | iter != warnings.end(); ++iter) |
| 673 | 673 | { |
| 674 | - *this->m->out_stream << "WARNING: " << (*iter) << std::endl; | |
| 674 | + *this->m->err_stream << "WARNING: " << (*iter) << std::endl; | |
| 675 | 675 | } |
| 676 | 676 | } |
| 677 | 677 | |
| ... | ... | @@ -1094,7 +1094,7 @@ QPDF::showLinearizationData() |
| 1094 | 1094 | } |
| 1095 | 1095 | catch (QPDFExc& e) |
| 1096 | 1096 | { |
| 1097 | - *this->m->out_stream << e.what() << std::endl; | |
| 1097 | + *this->m->err_stream << e.what() << std::endl; | |
| 1098 | 1098 | } |
| 1099 | 1099 | } |
| 1100 | 1100 | ... | ... |