From 8824242b844a9c4859897b64c9a75bcec35b72ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Wed, 29 Oct 2008 22:33:17 +0000 Subject: [PATCH] added some error output git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28369 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/translators/tiff/TIFFTranslator.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/add-ons/translators/tiff/TIFFTranslator.cpp b/src/add-ons/translators/tiff/TIFFTranslator.cpp index 5ed73e8665..f3c065dc02 100644 --- a/src/add-ons/translators/tiff/TIFFTranslator.cpp +++ b/src/add-ons/translators/tiff/TIFFTranslator.cpp @@ -181,8 +181,8 @@ identify_tiff_header(BPositionIO *inSource, BMessage *ioExtension, TIFF* tif = TIFFClientOpen("TIFFTranslator", "r", inSource, tiff_read_proc, tiff_write_proc, tiff_seek_proc, tiff_close_proc, tiff_size_proc, tiff_map_file_proc, tiff_unmap_file_proc); - if (!tif) - return B_NO_TRANSLATOR; + if (!tif) + return B_NO_TRANSLATOR; // count number of documents int32 documentCount = 0, documentIndex = 1; @@ -197,14 +197,17 @@ identify_tiff_header(BPositionIO *inSource, BMessage *ioExtension, if (documentIndex < 1 || documentIndex > documentCount) { // document index is invalid + fprintf(stderr, "identify_tiff_header: invalid document index\n"); return B_NO_TRANSLATOR; } } // identify the document the user specified or the first document // if the user did not specify which document they wanted to identify - if (!TIFFSetDirectory(tif, documentIndex - 1)) + if (!TIFFSetDirectory(tif, documentIndex - 1)) { + fprintf(stderr, "identify_tiff_header: couldn't set directory\n"); return B_NO_TRANSLATOR; + } if (ioExtension) { // add page count to ioExtension