Return-Path: X-Original-To: apmail-avro-user-archive@www.apache.org Delivered-To: apmail-avro-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3C05B8DD5 for ; Wed, 7 Sep 2011 20:48:29 +0000 (UTC) Received: (qmail 72236 invoked by uid 500); 7 Sep 2011 20:48:28 -0000 Delivered-To: apmail-avro-user-archive@avro.apache.org Received: (qmail 72148 invoked by uid 500); 7 Sep 2011 20:48:28 -0000 Mailing-List: contact user-help@avro.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@avro.apache.org Delivered-To: mailing list user@avro.apache.org Received: (qmail 72140 invoked by uid 99); 7 Sep 2011 20:48:28 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Sep 2011 20:48:27 +0000 Received: from localhost (HELO [192.168.168.16]) (127.0.0.1) (smtp-auth username cutting, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Sep 2011 20:48:27 +0000 Message-ID: <4E67D89B.4030600@apache.org> Date: Wed, 07 Sep 2011 13:48:27 -0700 From: Doug Cutting User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.21) Gecko/20110831 Thunderbird/3.1.13 MIME-Version: 1.0 To: user@avro.apache.org Subject: Re: explicit schema verification? References: In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 09/07/2011 01:17 PM, Yang wrote: > but instead of NPE, could we make Avro throw a more explicit exception, > so it's more descriptive? This is possible. It could be done back-compatibly by throwing a subclass of NullPointerException, e.g., AvroNullValueException. The logic in question is in GenericDatumWriter, where Avro builds an error message indicating the path to the null in the data. Please file an issue in Jira for this. Doug