Return-Path: <awaresystems.be+caf_=filtered=awaresystems.be@gmail.com>
Delivered-To: filtered@awaresystems.be
Received: from mx-e.one.com (mx-e.one.com [91.198.169.52])
	by mail6.local.one.com (Postfix) with ESMTP id 33DB030026911E
	for <filtered@awaresystems.be>; Mon, 29 Dec 2014 18:03:40 +0000 (UTC)
X-Virus-Scanned: by one.com
X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "MIME-Version"
Received-SPF: pass (mx-e: domain of awaresystems.be+caf_=filtered=awaresystems.be@gmail.com designates 209.85.217.181 as permitted sender)
X-Greylist: whitelisted by SQLgrey-1.8.0-rc2
Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com [209.85.217.181])
	by mx-e.one.com (Postfix) with ESMTP id E1C7334C695
	for <filtered@awaresystems.be>; Mon, 29 Dec 2014 18:03:39 +0000 (UTC)
Received: by mail-lb0-f181.google.com with SMTP id l4so11050605lbv.40
        for <filtered@awaresystems.be>; Mon, 29 Dec 2014 10:03:39 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-original-authentication-results:delivered-to:delivered-to
         :mime-version:in-reply-to:references:date:message-id:from:to:cc
         :subject:precedence:list-id:list-unsubscribe:list-archive:list-post
         :list-help:list-subscribe:content-type:mime-version:sender:errors-to;
        bh=WYeuobTxhFdoTL8BtExivKrfz4TpJZymdWFdjSWr0oU=;
        b=LjRfAGUT8on17SOQR82eYbBYd+1DF1Ol/8pAl4wpHXKruUdUkH4WgohOq0GnLkq6ib
         ZiLtND0Z9scJIGQVHix8zyz9rTz89GccnrtvmQhywG6i2sKK+sfZsUwzIZU/glzpK1/W
         WjZ0Lp2gajxlU0BldZkpH1iVyTwIzuJczIoAtVAeDAw/vO6gEgFZ/mZcSW/HPPE+F9WD
         jU9dH76QMMBMZGHyoUXWbgrXHm+BLr6rfefekpaKEIqU86KU8+M7BiACfb22mQ7+Y9Ur
         AL+cRor+4hE7mhvcdRSphRHQVu9uR02+6wpcH1MJHGv7BQlCWI4PtSj1rYQ7i3KkIF+k
         PPWQ==
X-Original-Authentication-Results: mx.google.com;       spf=none (google.com: tiff-bounces@lists.maptools.org does not designate permitted sender hosts) smtp.mail=tiff-bounces@lists.maptools.org
X-Received: by 10.152.203.201 with SMTP id ks9mr57181567lac.57.1419876219667;
        Mon, 29 Dec 2014 10:03:39 -0800 (PST)
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.114.181.147 with SMTP id dw19csp2019008ldc;
        Mon, 29 Dec 2014 10:03:39 -0800 (PST)
X-Received: by 10.152.5.38 with SMTP id p6mr58126973lap.91.1419876215984;
        Mon, 29 Dec 2014 10:03:35 -0800 (PST)
Authentication-Results: mx.google.com;
       spf=none (google.com: tiff-bounces@lists.maptools.org does not designate permitted sender hosts) smtp.mail=tiff-bounces@lists.maptools.org
Received-SPF: none (google.com: tiff-bounces@lists.maptools.org does not designate permitted sender hosts) client-ip=195.47.247.148;
Received: by 10.112.74.9 with POP3 id p9mf12806110lbv.25;
        Mon, 29 Dec 2014 10:03:35 -0800 (PST)
X-Gmail-Fetch-Info: info@awaresystems.be 1 pop.awaresystems.be 110 info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-w.one.com (mx-w.one.com [195.47.247.148])
	by mail6.local.one.com (Postfix) with ESMTP id DED3A30026911E
	for <info@awaresystems.be>; Mon, 29 Dec 2014 17:28:31 +0000 (UTC)
X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "MIME-Version"
X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0-rc2
Received: from lists.maptools.org (ks365428.kimsufi.com [94.23.4.142])
	by mx-w.one.com (Postfix) with ESMTP id B3DA4211329D2
	for <info@awaresystems.be>; Mon, 29 Dec 2014 17:28:31 +0000 (UTC)
Received: from [10.1.0.241] (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id 9566C35C039;
	Mon, 29 Dec 2014 12:27:45 -0500 (EST)
Received: from mail-wg0-f48.google.com (mail-wg0-f48.google.com [74.125.82.48])
	by lists.maptools.org (Postfix) with ESMTPS id 9553E35C023
	for <tiff@lists.maptools.org>; Mon, 29 Dec 2014 12:27:30 -0500 (EST)
Received: by mail-wg0-f48.google.com with SMTP id y19so19343561wgg.21
	for <tiff@lists.maptools.org>; Mon, 29 Dec 2014 09:27:39 -0800 (PST)
MIME-Version: 1.0
X-Received: by 10.194.75.195 with SMTP id e3mr56810158wjw.44.1419874059037;
	Mon, 29 Dec 2014 09:27:39 -0800 (PST)
Received: by 10.194.161.196 with HTTP; Mon, 29 Dec 2014 09:27:38 -0800 (PST)
In-Reply-To: <CAAcuQeb-2LHbdxCZwCqHzkfL4EC_Br-6K7QMELigxdw5oUzAqw@mail.gmail.com>
References: <CAK8GPyD-YJHuShe7jrzn3DUbmiUyZdyp7k6jLhXeTPR1C4GSQQ@mail.gmail.com>
	<CAAcuQeb-2LHbdxCZwCqHzkfL4EC_Br-6K7QMELigxdw5oUzAqw@mail.gmail.com>
Date: Mon, 29 Dec 2014 12:27:38 -0500
Message-ID: <CAK8GPyDXjRQVRYLJjJWr9LH7nJQRdpo3Xyrp7agGV=5zeHnDPg@mail.gmail.com>
From: Aaron Boxer <boxerab@gmail.com>
To: Olivier Paquet <olivier.paquet@gmail.com>
Cc: TIFF mailing list <tiff@lists.maptools.org>
Subject: Re: [Tiff] Windows Error Dialog
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="===============1096525800=="
Mime-version: 1.0
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

--===============1096525800==
Content-Type: multipart/alternative; boundary=047d7b5d52a6ea318f050b5e30d5

--047d7b5d52a6ea318f050b5e30d5
Content-Type: text/plain; charset=UTF-8

Unfortunately, when I set an error handler, the va_list parameter is
garbled.

Here is my simple error handler:

void MyTiffErrorHandler(const char *module, const char *fmt, va_list ap) {
        printf(fmt, ap);
}




On Mon, Dec 29, 2014 at 10:18 AM, Olivier Paquet <olivier.paquet@gmail.com>
wrote:

> Hi,
>     That behavior depends on how libtiff was built. It can also
> default to writing the error message to the console. Either way, to
> redirect the messages, set your own error handler with
> TIFFSetErrorHandler() and TIFFSetWarningHandler(). You should still
> check the return value of the functions you're calling for errors. In
> your example, TIFFOpen would return a NULL TIFF*.
>
> Olivier
>
> 2014-12-29 9:59 GMT-05:00 Aaron Boxer <boxerab@gmail.com>:
> > Hi,
> > I am using the latest libtiff on windows. When I try to open a file that
> > doesn't exist, for example,
> > I see a windows dialog pop up with an error message. Is it possible
> > for the library to simply set an error code and return?
> >
> > Thanks!
> > Aaron
> >
> > _______________________________________________
> > Tiff mailing list: Tiff@lists.maptools.org
> > http://lists.maptools.org/mailman/listinfo/tiff
> > http://www.remotesensing.org/libtiff/
>

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

<div dir=3D"ltr"><div>Unfortunately, when I set an error handler, the va_li=
st parameter is garbled.<br><br></div>Here is my simple error handler:<br><=
div><br>void MyTiffErrorHandler(const char *module, const char *fmt, va_lis=
t ap) {<br>=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 printf(fmt, ap);<br>}<br><=
br><br><br></div></div><div class=3D"gmail_extra"><br><div class=3D"gmail_q=
uote">On Mon, Dec 29, 2014 at 10:18 AM, Olivier Paquet <span dir=3D"ltr">&l=
t;<a href=3D"mailto:olivier.paquet@gmail.com" target=3D"_blank">olivier.paq=
uet@gmail.com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" st=
yle=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<b=
r>
=C2=A0 =C2=A0 That behavior depends on how libtiff was built. It can also<b=
r>
default to writing the error message to the console. Either way, to<br>
redirect the messages, set your own error handler with<br>
TIFFSetErrorHandler() and TIFFSetWarningHandler(). You should still<br>
check the return value of the functions you&#39;re calling for errors. In<b=
r>
your example, TIFFOpen would return a NULL TIFF*.<br>
<br>
Olivier<br>
<br>
2014-12-29 9:59 GMT-05:00 Aaron Boxer &lt;<a href=3D"mailto:boxerab@gmail.c=
om">boxerab@gmail.com</a>&gt;:<br>
<div><div class=3D"h5">&gt; Hi,<br>
&gt; I am using the latest libtiff on windows. When I try to open a file th=
at<br>
&gt; doesn&#39;t exist, for example,<br>
&gt; I see a windows dialog pop up with an error message. Is it possible<br=
>
&gt; for the library to simply set an error code and return?<br>
&gt;<br>
&gt; Thanks!<br>
&gt; Aaron<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; Tiff mailing list: <a href=3D"mailto:Tiff@lists.maptools.org">Tiff@lis=
ts.maptools.org</a><br>
&gt; <a href=3D"http://lists.maptools.org/mailman/listinfo/tiff" target=3D"=
_blank">http://lists.maptools.org/mailman/listinfo/tiff</a><br>
&gt; <a href=3D"http://www.remotesensing.org/libtiff/" target=3D"_blank">ht=
tp://www.remotesensing.org/libtiff/</a><br>
</blockquote></div><br></div>

--047d7b5d52a6ea318f050b5e30d5--

--===============1096525800==
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/
--===============1096525800==--
