From fdfb5fee63e48ea9c6d1f71c1c812521a033e42c Mon Sep 17 00:00:00 2001 From: Andreas Huggel Date: Tue, 25 May 2004 05:55:58 +0000 Subject: [PATCH] Added warning when makernote cannot be read --- src/exif.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/exif.cpp b/src/exif.cpp index 744a002f..8706c99b 100644 --- a/src/exif.cpp +++ b/src/exif.cpp @@ -20,14 +20,14 @@ */ /* File: exif.cpp - Version: $Name: $ $Revision: 1.42 $ + Version: $Name: $ $Revision: 1.43 $ Author(s): Andreas Huggel (ahu) History: 26-Jan-04, ahu: created 11-Feb-04, ahu: isolated as a component */ // ***************************************************************************** #include "rcsid.hpp" -EXIV2_RCSID("@(#) $Name: $ $Revision: 1.42 $ $RCSfile: exif.cpp,v $") +EXIV2_RCSID("@(#) $Name: $ $Revision: 1.43 $ $RCSfile: exif.cpp,v $") // Define DEBUG_MAKERNOTE to output debug information to std::cerr #undef DEBUG_MAKERNOTE @@ -590,6 +590,11 @@ namespace Exiv2 { byteOrder(), exifIfd_.offset() + pos->offset()); if (rc) { + // Todo: How to handle debug output like this + std::cerr << "Warning: Failed to read " + << pMakerNote_->sectionName(0) + << " Makernote, rc = " << rc << "\n"; + delete pMakerNote_; pMakerNote_ = 0; }