Return-Path: <awaresystems.be+caf_=filtered=awaresystems.be@gmail.com>
Delivered-To: filtered@awaresystems.be
Received: from mx8.public.one.com ([10.246.18.28])
	by mail6.local.one.com (Dovecot) with LMTP id 38FZOb33zFiLdQEAsyOMew
	for <filtered@awaresystems.be>; Sat, 18 Mar 2017 10:54:53 +0000
X-HalOne-ID: 5026d8e8-0bc9-11e7-84a4-549f350a57e2
Received: from mail-ot0-f175.google.com (unknown [74.125.82.175])
	by mx8.public.one.com (Halon) with ESMTPS
	id 5026d8e8-0bc9-11e7-84a4-549f350a57e2;
	Sat, 18 Mar 2017 10:54:52 +0000 (UTC)
Received: by mail-ot0-f175.google.com with SMTP id o24so109409754otb.1
        for <filtered@awaresystems.be>; Sat, 18 Mar 2017 03:54:52 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-original-authentication-results:x-gm-message-state:delivered-to
         :mime-version:in-reply-to:references:from:date:message-id:to:cc
         :subject:precedence:list-id:list-unsubscribe:list-archive:list-post
         :list-help:list-subscribe:mime-version:sender:errors-to;
        bh=rG/PU8rBwRq3YPG4/adOkJRM4cnvU2zIto0VlRWx4QQ=;
        b=Z+wc8VeP6YzSRqmKcgnzVXSAeXWAirBXqqORD9C3PjA3zATovQiZgVbCWFn/gbw3YS
         B08YD3Z4CeNX9jKiLwB4I5vkiAPxJSgcZ7+XduQxtmOeQeS52CO6gSKc7DTOkjeCGSqn
         9rT5T/olfXJ+8pqlqwo1YdbCimy2ui2u6F8OAIyzsHSKh3Zxy+V35/4vmi/wEODUZRuO
         twHxUYDYsuGn8IjLuhCEWZvN5PhIXbwJFfS8wpQlTWV+9ldgLfWjKjtsZfkXsLr2/lK2
         asp6XOIIwIndCbp4GEVFy1pTwDynAqtLAt3Wt6UOSV3fcuPBiomeDeB5TQW6EV4J6CXV
         TtGA==
X-Original-Authentication-Results: mx.google.com;       spf=neutral (google.com: 94.23.4.142 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) smtp.mailfrom=tiff-bounces@lists.maptools.org;       dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com
X-Gm-Message-State: AFeK/H1njgiV+XMWtstUCvSLzTHYNBxZcw9YMxXNYIPJ3MY7D4zE9WnI1kCSnwerYnV8a7JPhGDZCS75r6vnzcmfkk8juPM=
X-Received: by 10.157.19.15 with SMTP id f15mr9373093ote.168.1489834491440;
        Sat, 18 Mar 2017 03:54:51 -0700 (PDT)
X-Forwarded-To: filtered@awaresystems.be
X-Forwarded-For: awaresystems.be@gmail.com filtered@awaresystems.be
Delivered-To: awaresystems.be@gmail.com
Received: by 10.202.195.2 with SMTP id t2csp678062oif;
        Sat, 18 Mar 2017 03:54:50 -0700 (PDT)
X-Received: by 10.28.142.73 with SMTP id q70mr1303665wmd.105.1489834490292;
        Sat, 18 Mar 2017 03:54:50 -0700 (PDT)
Return-Path: <tiff-bounces@lists.maptools.org>
Received: from lists.maptools.org (ks365428.kimsufi.com. [94.23.4.142])
        by mx.google.com with ESMTP id h190si6837830wmd.5.2017.03.18.03.54.49;
        Sat, 18 Mar 2017 03:54:50 -0700 (PDT)
Received-SPF: neutral (google.com: 94.23.4.142 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) client-ip=94.23.4.142;
Authentication-Results: mx.google.com;
       spf=neutral (google.com: 94.23.4.142 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) smtp.mailfrom=tiff-bounces@lists.maptools.org;
       dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com
Received: from [10.1.0.241] (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id BCE3035C079;
	Sat, 18 Mar 2017 05:53:48 -0500 (EST)
Received: from mail-pf0-f172.google.com (mail-pf0-f172.google.com
	[209.85.192.172])
	by lists.maptools.org (Postfix) with ESMTPS id 4C45E35C076
	for <tiff@lists.maptools.org>; Sat, 18 Mar 2017 05:53:35 -0500 (EST)
Received: by mail-pf0-f172.google.com with SMTP id e129so9168383pfh.0
	for <tiff@lists.maptools.org>; Sat, 18 Mar 2017 03:53:35 -0700 (PDT)
X-Received: by 10.99.54.140 with SMTP id d134mr20814048pga.91.1489834413445;
	Sat, 18 Mar 2017 03:53:33 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.100.180.106 with HTTP; Sat, 18 Mar 2017 03:53:13 -0700 (PDT)
In-Reply-To: <18b5b63b7b889c5c3c9f51af1b2651c4@codelibre.net>
References: <CAHcSuBpB46=uPKCS48LuFCqbZ1GeQau6_f8Bbbj5fs6LbJdE+Q@mail.gmail.com>
	<alpine.GSO.2.20.1703170947500.4525@scrappy.simplesystems.org>
	<CAHcSuBqZQh4kJH_R_9LEkpnjRm=s-CmOE_vcoyRF6fxgwt1B8A@mail.gmail.com>
	<alpine.GSO.2.20.1703171154040.4525@scrappy.simplesystems.org>
	<18b5b63b7b889c5c3c9f51af1b2651c4@codelibre.net>
From: Yakov Galka <ybungalobill@gmail.com>
Date: Sat, 18 Mar 2017 12:53:13 +0200
Message-ID: <CAO=tXLB_V5yb_gCWjP7ZuuzL7cU1tf2_o6u53U9EMK16AqzxHg@mail.gmail.com>
To: rleigh@codelibre.net
Cc: TIFF mailing list <tiff@lists.maptools.org>
Subject: Re: [Tiff] TIFFSetErrorHandler vs TIFFSetErrorHandlerExt
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.maptools.org>
List-Unsubscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=unsubscribe>
List-Archive: <http://lists.maptools.org/mailman/private/tiff>
List-Post: <mailto:tiff@lists.maptools.org>
List-Help: <mailto:tiff-request@lists.maptools.org?subject=help>
List-Subscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============0843771111=="
Mime-version: 1.0
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

--===============0843771111==
Content-Type: multipart/alternative; boundary=94eb2c192b82fcdb54054aff1aad

--94eb2c192b82fcdb54054aff1aad
Content-Type: text/plain; charset=UTF-8

On Fri, Mar 17, 2017 at 11:02 PM, <rleigh@codelibre.net> wrote:

> If the libtiff core were to use a C++ TIFF class reporting errors via
> exceptions, it would be possible for this to be wrapped by the existing
> C API calling the C++ code in a try/catch block and reporting any thrown
> errors via the handlers.
>

The Error handlers are not the only way libTIFF reports errors. The no. 1
way it reports errors is through return values. The error and warning
handlers are used more like a logging facility to output extra information
about the cause of the errors and other issues. In particular when one of
them gets called it is not supposed to abort the caller execution (either
by throw or longjmp), because, among other things, the processing may
continue and call the handlers multiple times. Therefore, exceptions are a
not a substitute for them even if libTIFF were a C++ library.

-- 
Yakov Galka
http://stannum.co.il/

--94eb2c192b82fcdb54054aff1aad
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">=
On Fri, Mar 17, 2017 at 11:02 PM,  <span dir=3D"ltr">&lt;<a href=3D"mailto:=
rleigh@codelibre.net" target=3D"_blank">rleigh@codelibre.net</a>&gt;</span>=
 wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bor=
der-left:1px #ccc solid;padding-left:1ex"><div id=3D":s8" class=3D"a3s aXjC=
H m15ade15d457a3da1">If the libtiff core were to use a C++ TIFF class repor=
ting errors via<br>
exceptions, it would be possible for this to be wrapped by the existing<br>
C API calling the C++ code in a try/catch block and reporting any thrown<br=
>
errors via the handlers.</div></blockquote></div><br></div><div class=3D"gm=
ail_extra">The Error handlers are not the only way libTIFF reports errors. =
The no. 1 way it reports errors is through return values. The error and war=
ning handlers are used more like a logging facility to output extra informa=
tion about the cause of the errors and other issues. In particular when one=
 of them gets called it is not supposed to abort the caller execution (eith=
er by throw or longjmp), because, among other things, the processing may co=
ntinue and call the handlers multiple times. Therefore, exceptions are a no=
t a substitute for them even if libTIFF were a C++ library.<br></div><div c=
lass=3D"gmail_extra"><br>-- <br><div class=3D"gmail_signature" data-smartma=
il=3D"gmail_signature"><div dir=3D"ltr"><div>Yakov Galka<br><a href=3D"http=
://stannum.co.il/" target=3D"_blank">http://stannum.co.il/</a></div></div><=
/div>
</div></div>

--94eb2c192b82fcdb54054aff1aad--

--===============0843771111==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
--===============0843771111==--
