Return-Path: <bfriesen@simple.dallas.tx.us>
Received: from inmx016.isp.belgacom.be (inmx016.isp.belgacom.be [195.238.2.219])
        by mailst006.isp.belgacom.be (8.12.11/8.12.11/Skynet-MAILSTORE-2.14) with ESMTP id i7T5kePI016410
        for <joris.at.lebbeke@skynet.be>; Sun, 29 Aug 2004 07:46:40 +0200
        (envelope-from <bfriesen@simple.dallas.tx.us>)
Received: from mta206-rme.xtra.co.nz (mta206-rme.xtra.co.nz [210.86.15.58])
        by inmx016.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-2.32) with ESMTP id i7T5kYIc003246
        for <joris.at.lebbeke@skynet.be>; Sun, 29 Aug 2004 07:46:35 +0200
        (envelope-from <bfriesen@simple.dallas.tx.us>)
Received: from mta3-rme.xtra.co.nz ([210.86.15.140])
          by mta206-rme.xtra.co.nz with ESMTP
          id <20040829054632.CHMN25634.mta206-rme.xtra.co.nz@mta3-rme.xtra.co.nz>;
          Sun, 29 Aug 2004 17:46:32 +1200
Received: from zeus.concept.co.nz ([219.88.64.156]) by mta3-rme.xtra.co.nz
          with ESMTP
          id <20040829054632.JQWD24839.mta3-rme.xtra.co.nz@zeus.concept.co.nz>;
          Sun, 29 Aug 2004 17:46:32 +1200
Received: from zeus.concept.co.nz (zeus [10.0.0.250]) by zeus.concept.co.nz with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13)
	id PVAQ2Y2L; Sun, 29 Aug 2004 17:46:22 +1200
Received: by zeus.concept.co.nz (Microsoft Exchange Connector for POP3 Mailboxes 4.50.2113) with SMTP (Global POP3 Download)
	 id MSG08292004-174557-18588.MMD@concept.co.nz; Sun, 29 Aug 2004 17:45:57 +1200
Delivered-To: computerconcepts-co-nz-martin@computerconcepts.co.nz
X-Envelope-To: <martin@computerconcepts.co.nz>
Received: (qmail 19288 invoked by uid 408); 29 Aug 2004 16:49:01 +1200
Received: from tiff-bounces@remotesensing.org by zee.iserve.net.nz by uid 401 with qmail-scanner-1.22 
 (clamdscan: 0.71.  Clear:RC:0(65.83.169.202):. 
 Processed in 0.820732 secs); 29 Aug 2004 04:49:01 -0000
Received: from unknown (HELO xserve.flids.com) (65.83.169.202)
  by mx1-5.iserve.net.nz with SMTP; 29 Aug 2004 16:49:00 +1200
Received: from adsl-065-083-169-202.sip.mco.bellsouth.net (localhost [127.0.0.1])
	by xserve.flids.com (Postfix) with ESMTP
	id 25CF126D762; Sun, 29 Aug 2004 00:48:42 -0400 (EDT)
X-Original-To: tiff@remotesensing.org
Delivered-To: tiff@remotesensing.org
Received: from scooby.simplesystems.org (scooby.simplesystems.org
	[65.66.246.67])
	by xserve.flids.com (Postfix) with ESMTP id 6291C26D73E
	for <tiff@remotesensing.org>; Sun, 29 Aug 2004 00:48:39 -0400 (EDT)
Received: from blade.simplesystems.org (blade.simplesystems.org [65.66.246.74])
	by scooby.simplesystems.org (8.12.10+Sun/8.12.10) with ESMTP id
	i7T4mc9p002064; Sat, 28 Aug 2004 23:48:38 -0500 (CDT)
Date: Sat, 28 Aug 2004 23:48:38 -0500 (CDT)
From: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
X-X-Sender: bfriesen@blade.simplesystems.org
To: Joris <joris.at.lebbeke@skynet.be>
Subject: Re: [Tiff] tif_fd and error handling
In-Reply-To: <000701c48d70$ba601890$4f27c850@dfgrrxsknr4e>
Message-ID: <Pine.SOC.4.60.0408282328450.15991@blade.simplesystems.org>
References: <000701c48d70$ba601890$4f27c850@dfgrrxsknr4e>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
Cc: Tiff mailing list <tiff@remotesensing.org>
X-BeenThere: tiff@remotesensing.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: TIFF and libtiff discussion  <tiff.remotesensing.org>
List-Unsubscribe: <http://xserve.flids.com/mailman/listinfo/tiff>,
	<mailto:tiff-request@remotesensing.org?subject=unsubscribe>
List-Archive: <http://xserve.flids.com/pipermail/tiff>
List-Post: <mailto:tiff@remotesensing.org>
List-Help: <mailto:tiff-request@remotesensing.org?subject=help>
List-Subscribe: <http://xserve.flids.com/mailman/listinfo/tiff>,
	<mailto:tiff-request@remotesensing.org?subject=subscribe>
Sender: tiff-bounces@remotesensing.org
Errors-To: tiff-bounces@remotesensing.org
X-Spam-Virus-Prob: 0.0001
X-Spam-Classification: good
X-Spam-Probability: 0.0907
X-Spam-Server: d2s.iserve.net.nz
X-Spam-File: conmail@pop3.iserve.net.nz/good/584d6343c5448dba
X-UIDL: 94082111b1d1e1157338c73fc010984d

On Sun, 29 Aug 2004, Joris wrote:
>
> 2) I find the TIFFError and related completely useless. It is feeded no context
> whatsoever, neither a TIFF*, nor a tif_clientdata, nor a tif_fd. This may be
> fine in the typical Unix command-line tool that handles a single TIFF or set of
> TIFFs and knows what the errors are about and simply feeds them to the console
> and exits. But anything beyond that, from file browser to image editor or
> whatever, needs an indication of context together with the warning and error
> messages. I could either revert to Photoshop-style meaningfull messages, like
> 'The TIFF file cannot be opened because there was an error opening the TIFF
> file', or I could make my LibTiff modifications all over again and add that
> context to all TIFFError and TIFFWarning calls... I find neither option
> acceptable. I cannot understand why any of you is not bitten by this problem
> that was signalled as early as 1994 (http://www.asmail.be/msg0054815913.html).
> Is there something I am missing? How do you folks deal with this?

I agree with Erik Corry's (and Joris's) opinion.  Any asynchronous 
error reporter should pass user supplied context.

However, not all hope is lost.  Multithread environments normally 
provide the means to obtain the current thread ID.  As long as the 
per-thread context is associated with the thread before libtiff is 
called, then the current thread ID may be used to retrieve it within 
the warning/error handler.

Bob
======================================
Bob Friesenhahn
bfriesen@simple.dallas.tx.us
http://www.simplesystems.org/users/bfriesen
_______________________________________________
Tiff mailing list
Tiff@remotesensing.org
http://xserve.flids.com/mailman/listinfo/tiff



