Return-Path: <tiff-bounces@lists.maptools.org>
X-Original-To: info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-k.b-one.net (mx-k.one.com [91.198.169.58])
	by mail9.b-one.net (Postfix) with ESMTP id 1F977400125
	for <info@awaresystems.be>; Fri,  6 Feb 2009 15:20:01 +0100 (CET)
X-Virus-Scanned: by one.com
X-Spam-Score: 0
X-Spam-Level: 
X-Spam-Status: No, score=0 tagged_above=0 required=6 tests=[none]
X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4
Received: from lists.maptools.org (lists.maptools.org [65.39.174.144])
	by mx-k.b-one.net (Postfix) with ESMTP id 397E7C22C52
	for <info@awaresystems.be>; Fri,  6 Feb 2009 15:19:59 +0100 (CET)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id 77C091D18B12D;
	Fri,  6 Feb 2009 09:19:09 -0500 (EST)
Received: from mail.sidefx.com (mail.sidefx.com [38.99.137.163])
	by lists.maptools.org (Postfix) with ESMTP id 54EF71D18896A
	for <tiff@lists.maptools.org>; Fri,  6 Feb 2009 08:57:16 -0500 (EST)
Message-ID: <498C41C2.50309@sidefx.com>
Date: Fri, 06 Feb 2009 08:57:22 -0500
From: Edward Lam <edward@sidefx.com>
User-Agent: Thunderbird 2.0.0.19 (Windows/20081209)
MIME-Version: 1.0
To: Ron <ron@debian.org>
References: <498B321F.3000300@pobox.com>	<Pine.SOC.4.64.0902051303550.12379@freddy.simplesystems.org>	<498B3D49.2030202@pobox.com>	<Pine.SOC.4.64.0902051352210.12379@freddy.simplesystems.org>
	<20090206121712.GA10240@homer.shelbyville.oz>
In-Reply-To: <20090206121712.GA10240@homer.shelbyville.oz>
Cc: tiff@lists.maptools.org
Subject: Re: [Tiff] assertions, and building with DEBUG/NDEBUG
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: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

Ron wrote:
> I'd say drop the use of assert in most places and just forget NDEBUG exists
> is probably the best approach for libtiff.  Libraries generally shouldn't
> terminate their calling process without a very good reason.  We can't
> possibly know what data loss may occur if we don't let the caller do a
> managed shutdown of their own stuff.

I don't think your arguments necessarily exclude the use of 
assert()-type mechanisms in libtiff. It just means that libtiff should 
have its own assert mechanism that is tailored specifically for its 
requirements. I like Philip Crew's idea of having a custom assert() 
mechanism that can be tailored (possibly at runtime?) to produce 
different behaviours such as generating internal errors, producing logs, 
etc.

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