From mime4j-dev-return-386-apmail-james-mime4j-dev-archive=james.apache.org@james.apache.org Thu Apr 09 15:30:34 2009 Return-Path: Delivered-To: apmail-james-mime4j-dev-archive@minotaur.apache.org Received: (qmail 66822 invoked from network); 9 Apr 2009 15:30:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Apr 2009 15:30:34 -0000 Received: (qmail 82445 invoked by uid 500); 9 Apr 2009 15:30:34 -0000 Delivered-To: apmail-james-mime4j-dev-archive@james.apache.org Received: (qmail 82420 invoked by uid 500); 9 Apr 2009 15:30:34 -0000 Mailing-List: contact mime4j-dev-help@james.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mime4j-dev@james.apache.org Delivered-To: mailing list mime4j-dev@james.apache.org Received: (qmail 82410 invoked by uid 99); 9 Apr 2009 15:30:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Apr 2009 15:30:34 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of robertburrelldonkin@gmail.com designates 209.85.218.171 as permitted sender) Received: from [209.85.218.171] (HELO mail-bw0-f171.google.com) (209.85.218.171) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Apr 2009 15:30:26 +0000 Received: by bwz19 with SMTP id 19so803884bwz.4 for ; Thu, 09 Apr 2009 08:30:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=5ESEL7A0Ju8K552ZDS5p9+b7xmgNCUSs4Ppu8P6rAL0=; b=KSegkVoJt4ed4qdOJZHGSwUOyC+1Cql5TJb46gpHoqF3szWsrWUHB6N/HP9X2jdG4d lYOlOp8LCETgXnG5F0ZrfnSeHIxDuqHYYqiXHssFtVNCKMg2yRidvaSr4XFcGVeXlGoa oZkZrjrn3Jtd+NSQm9zd2RFlb1z+FvOq71/pw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=ef8/Jq3YdHG45P5jT2AnvjmeY0h/9804uHXzquu+e9UiqPAtjUsykRiSAtBt15Wdo0 uw6pI8zRuqp9RWxPVKZgDGqyKJNJ2HqI3f3WlmP32WKsg4NnEeH8AsfLVkU7yKoBaYZm g+cz6M91xzzy008+0dmpamVtUpoRwiYL16t9I= MIME-Version: 1.0 Received: by 10.204.60.72 with SMTP id o8mr2295647bkh.210.1239291004932; Thu, 09 Apr 2009 08:30:04 -0700 (PDT) In-Reply-To: References: Date: Thu, 9 Apr 2009 16:30:04 +0100 Message-ID: Subject: Re: Exception I18n...? From: Robert Burrell Donkin To: mime4j-dev@james.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On Thu, Apr 9, 2009 at 11:07 AM, Markus Wiederkehr wrote: > On Wed, Apr 8, 2009 at 9:28 AM, Robert Burrell Donkin > wrote: >> ATM exceptions contain messages in english. for some upstream use >> cases (in particular IMAP), it would be useful to be able to display >> to the user an internationalised reasonably diagnostic message. the >> actual i18n could be done upstream provided that this library supplied >> more information. > > I am not sure if it is a good idea to confront the user with exception > detail messages. I think details messages are often too technical for > being of any value to the average user (no insult intended ;-). > > I usually handle this by only letting the user know that something > went wrong. An administrator or technician can then look into the log > files and see what's going on. i agree to some extent. there are lots of cases when that's the only solution. i can also understand why contacting an admin or technician is a unnecessary cost in some cases. for example, if a field cannot be parsed since it's badly formatted, this is just a data problem with the email. i think this could sometimes be reasonably presented to the user. > But that's just my two cents.. What would you need to implement what > you want? A unique tag for each exception? Easy for our own > exceptions, difficult for system library exceptions.. And what about > exception chaining? i'm not so concerned about system library exceptions or chained ones - these will usually indicate something that really needs the ops to take a look to find out what's gone wrong. something as simple as an enumeration or tag should be good enough to allow anyone who wants to internationalise. - robert