Commit 90217e6686fe2f3790f2a36d1ab74bab13a0aab5
1 parent
c60af08a
Fix another case of errors written to stdout (fixes #438)
Showing
5 changed files
with
5 additions
and
6 deletions
TODO
qpdf/qpdf.cc
| ... | ... | @@ -3513,14 +3513,14 @@ static void do_check(QPDF& pdf, Options& o, int& exit_code) |
| 3513 | 3513 | catch (QPDFExc& e) |
| 3514 | 3514 | { |
| 3515 | 3515 | okay = false; |
| 3516 | - std::cout << "page " << pageno << ": " | |
| 3516 | + std::cerr << "ERROR: page " << pageno << ": " | |
| 3517 | 3517 | << e.what() << std::endl; |
| 3518 | 3518 | } |
| 3519 | 3519 | } |
| 3520 | 3520 | } |
| 3521 | 3521 | catch (std::exception& e) |
| 3522 | 3522 | { |
| 3523 | - std::cout << e.what() << std::endl; | |
| 3523 | + std::cerr << "ERROR: " << e.what() << std::endl; | |
| 3524 | 3524 | okay = false; |
| 3525 | 3525 | } |
| 3526 | 3526 | if (okay) | ... | ... |
qpdf/qtest/qpdf/linearization-large-vector-alloc.out
| ... | ... | @@ -5,4 +5,4 @@ File is linearized |
| 5 | 5 | WARNING: linearization-large-vector-alloc.pdf (linearization hint stream: object 62 0, offset 1282): expected endstream |
| 6 | 6 | WARNING: linearization-large-vector-alloc.pdf (linearization hint stream: object 62 0, offset 1183): attempting to recover stream length |
| 7 | 7 | WARNING: linearization-large-vector-alloc.pdf (linearization hint stream: object 62 0, offset 1183): recovered stream length: 106 |
| 8 | -overflow reading bit stream | |
| 8 | +ERROR: overflow reading bit stream | ... | ... |
qpdf/qtest/qpdf/pages-loop.out
qpdf/qtest/qpdf/split-content-stream-errors.out
| ... | ... | @@ -6,4 +6,4 @@ WARNING: split-content-stream-errors.pdf (offset 557): error decoding stream dat |
| 6 | 6 | WARNING: split-content-stream-errors.pdf (offset 557): stream will be re-processed without filtering to avoid data loss |
| 7 | 7 | WARNING: page object 3 0 (item index 0 (from 0)): ignoring non-stream in an array of streams |
| 8 | 8 | WARNING: split-content-stream-errors.pdf (offset 557): error decoding stream data for object 6 0: LZWDecoder: bad code received |
| 9 | -page 1: content stream (content stream object 6 0): errors while decoding content stream | |
| 9 | +ERROR: page 1: content stream (content stream object 6 0): errors while decoding content stream | ... | ... |